aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-01-19 14:41:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-01-19 14:41:34 +0000
commit20f155ed80f42118beade21059cef19d92828748 (patch)
tree80154392167abdba674208537d9d4a0c8a1753b7 /libavcodec
parent40a3105d46587151d822bc7d65276e4c36ca6c6b (diff)
downloadffmpeg-20f155ed80f42118beade21059cef19d92828748.tar.gz
avcodec_flush_buffers() fix
Originally committed as revision 2715 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index af8626faf2..3f21349385 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -3585,6 +3585,9 @@ void ff_mpeg_flush(AVCodecContext *avctx){
int i;
MpegEncContext *s = avctx->priv_data;
+ if(s==NULL || s->picture==NULL)
+ return;
+
for(i=0; i<MAX_PICTURE_COUNT; i++){
if(s->picture[i].data[0] && ( s->picture[i].type == FF_BUFFER_TYPE_INTERNAL
|| s->picture[i].type == FF_BUFFER_TYPE_USER))