diff options
author | James Almer <jamrial@gmail.com> | 2019-10-18 23:14:21 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-10-18 23:14:40 -0300 |
commit | 0700e7247b83934c610a44e0312fb685c78e903c (patch) | |
tree | 61523112793bad2e44c2a94debf45b875f9ed824 | |
parent | 1d479300cbe0522c233b7d51148aea2b29bd29ad (diff) | |
download | ffmpeg-0700e7247b83934c610a44e0312fb685c78e903c.tar.gz |
avformat/mpegenc: check for stream private data during deinit
Prevents pointer dereferences when streams were not fully initialized.
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/mpegenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 93f40b202c..f6980231a2 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1258,6 +1258,8 @@ static void mpeg_mux_deinit(AVFormatContext *ctx) { for (int i = 0; i < ctx->nb_streams; i++) { StreamInfo *stream = ctx->streams[i]->priv_data; + if (!stream) + continue; av_fifo_freep(&stream->fifo); } } |