1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/mpeg4videodec: unbreak multithreading decoding

Should fix double free related crashes.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2018-04-04 11:06:55 -03:00
parent 2f0e0deadc
commit 2f27370111

View File

@ -3380,11 +3380,13 @@ static av_cold int decode_end(AVCodecContext *avctx)
Mpeg4DecContext *ctx = avctx->priv_data; Mpeg4DecContext *ctx = avctx->priv_data;
int i; int i;
for (i = 0; i < 12; i++) if (!avctx->internal->is_copy) {
ff_free_vlc(&ctx->studio_intra_tab[i]); for (i = 0; i < 12; i++)
ff_free_vlc(&ctx->studio_intra_tab[i]);
ff_free_vlc(&ctx->studio_luma_dc); ff_free_vlc(&ctx->studio_luma_dc);
ff_free_vlc(&ctx->studio_chroma_dc); ff_free_vlc(&ctx->studio_chroma_dc);
}
return ff_h263_decode_end(avctx); return ff_h263_decode_end(avctx);
} }