diff options
author | Jeff Downs <heydowns@borg.com> | 2008-01-28 21:12:38 +0000 |
---|---|---|
committer | Jeff Downs <heydowns@borg.com> | 2008-01-28 21:12:38 +0000 |
commit | 79db7ac6ef235a06c3049d7792eda39da28ee3fd (patch) | |
tree | b3f4458f724d3da7978cb8c7902d8779fa260f8d /libavcodec/mpegvideo.c | |
parent | 0b98a7b3b2b2cd9fe22cd693254544890b0d8fd9 (diff) | |
download | ffmpeg-79db7ac6ef235a06c3049d7792eda39da28ee3fd.tar.gz |
Fix memory leak in h264 decoder. allocated_edge_emu_buffer was being allocated
in both mpegvideo and h264 decoder. Fixed by allowing all (master and duplicate)
contexts to fully initialize in MPV_frame_start and copying these into
H264Contexts.
Mailing list discussion:
[FFmpeg-devel] Memory leak in h264
Tue, 22 Jan 2008 15:22:55
Originally committed as revision 11657 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f4d5e58c54..4788118d5b 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -587,9 +587,7 @@ int MPV_common_init(MpegEncContext *s) s->context_initialized = 1; s->thread_context[0]= s; - /* h264 does thread context setup itself, but it needs context[0] - * to be fully initialized for the error resilience code */ - threads = s->codec_id == CODEC_ID_H264 ? 1 : s->avctx->thread_count; + threads = s->avctx->thread_count; for(i=1; i<threads; i++){ s->thread_context[i]= av_malloc(sizeof(MpegEncContext)); |