* fix for empty image queue
authorZdenek Kabelac <kabi@informatics.muni.cz>
Thu, 19 Dec 2002 18:59:45 +0000 (18:59 +0000)
committerZdenek Kabelac <kabi@informatics.muni.cz>
Thu, 19 Dec 2002 18:59:45 +0000 (18:59 +0000)
Originally committed as revision 1342 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpeg12.c

index 074e10d..17a9aec 100644 (file)
@@ -1718,7 +1718,7 @@ eos: //end of slice
             s->picture_number++;
             /* latency of 1 frame for I and P frames */
             /* XXX: use another variable than picture_number */
-            if (s->picture_number == 1) {
+            if (s->last_picture.data[0] == NULL) {
                 return DECODE_SLICE_OK;
             } else {
                 *pict= *(AVFrame*)&s->last_picture;