From 87fb268fdcc548d5eeab047338bab515fc6872b1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 6 Jan 2003 18:09:27 +0000 Subject: * 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 --- libavcodec/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d593a0de78..162d194fc7 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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 -- cgit v1.2.3