Commit 0700e724 authored by James Almer's avatar James Almer

avformat/mpegenc: check for stream private data during deinit

Prevents pointer dereferences when streams were not fully initialized.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 1d479300
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment