Commit 90a1cc19 authored by lorenm's avatar lorenm

fix a memory leak on seeking.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5062 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1285cfd4
...@@ -3909,8 +3909,13 @@ static void idr(H264Context *h){ ...@@ -3909,8 +3909,13 @@ static void idr(H264Context *h){
static void flush_dpb(AVCodecContext *avctx){ static void flush_dpb(AVCodecContext *avctx){
H264Context *h= avctx->priv_data; H264Context *h= avctx->priv_data;
int i; 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; h->delayed_pic[i]= NULL;
}
if(h->delayed_output_pic)
h->delayed_output_pic->reference= 0;
h->delayed_output_pic= NULL; h->delayed_output_pic= NULL;
idr(h); idr(h);
if(h->s.current_picture_ptr) if(h->s.current_picture_ptr)
......
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