changeset 1751:3f1125adbc84 libavcodec

avcodec_flush_buffers() fix
author michael
date Mon, 19 Jan 2004 14:41:34 +0000
parents 610617f1dbd0
children 9f47c2211da9
files mpegvideo.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Sun Jan 18 21:57:32 2004 +0000
+++ b/mpegvideo.c	Mon Jan 19 14:41:34 2004 +0000
@@ -3585,6 +3585,9 @@
     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))