mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
1d479300cb
commit
0700e7247b
|
@ -1258,6 +1258,8 @@ static void mpeg_mux_deinit(AVFormatContext *ctx)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ctx->nb_streams; i++) {
|
for (int i = 0; i < ctx->nb_streams; i++) {
|
||||||
StreamInfo *stream = ctx->streams[i]->priv_data;
|
StreamInfo *stream = ctx->streams[i]->priv_data;
|
||||||
|
if (!stream)
|
||||||
|
continue;
|
||||||
av_fifo_freep(&stream->fifo);
|
av_fifo_freep(&stream->fifo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue