Browse Source

* avoid usage of next/last buffer after flush

(but there still something wrong when the first frame isn't keyframe)

Originally committed as revision 1403 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Zdenek Kabelac 23 years ago
parent
commit
87fb268fdc
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/utils.c

+ 2
- 1
libavcodec/utils.c View File

@@ -677,7 +677,8 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
if(s->picture[i].data[0] && ( s->picture[i].type == FF_BUFFER_TYPE_INTERNAL
|| s->picture[i].type == FF_BUFFER_TYPE_USER))
avctx->release_buffer(avctx, (AVFrame*)&s->picture[i]);
}
}
s->last_picture.data[0] = s->next_picture.data[0] = NULL;
break;
default:
//FIXME


Loading…
Cancel
Save