Browse Source

fix a memory leak on seeking.

Originally committed as revision 5062 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Loren Merritt 19 years ago
parent
commit
285b570fd2
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      libavcodec/h264.c

+ 6
- 1
libavcodec/h264.c View File

@@ -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)


Loading…
Cancel
Save