mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mpegtsenc: check avformat_new_stream() return
Fixes CID1206645 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
24725f8e09
commit
66e30a2e65
|
@ -700,6 +700,10 @@ static int mpegts_write_header(AVFormatContext *s)
|
|||
goto fail;
|
||||
}
|
||||
ast = avformat_new_stream(ts_st->amux, NULL);
|
||||
if (!ast) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
ret = avcodec_copy_context(ast->codec, st->codec);
|
||||
if (ret != 0)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue