diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2006-02-25 22:15:24 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2006-02-25 22:15:24 +0000 |
commit | 285b570fd23a14762ed06024b4eca0ce59b5833b (patch) | |
tree | 8a62f7eae8366634f6a39fee911a47edaa9da043 /libavcodec | |
parent | 788223b1553f563e43a93b8d2beb01d09347156d (diff) | |
download | ffmpeg-285b570fd23a14762ed06024b4eca0ce59b5833b.tar.gz |
fix a memory leak on seeking.
Originally committed as revision 5062 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ddecc12aca..770d552f65 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3909,8 +3909,13 @@ static void idr(H264Context *h){ static void flush_dpb(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; int i; - for(i=0; i<16; i++) + for(i=0; i<16; i++) { + if(h->delayed_pic[i]) + h->delayed_pic[i]->reference= 0; h->delayed_pic[i]= NULL; + } + if(h->delayed_output_pic) + h->delayed_output_pic->reference= 0; h->delayed_output_pic= NULL; idr(h); if(h->s.current_picture_ptr) |