return EOF in image2 demuxer
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 30 Jul 2009 08:21:11 +0000 (08:21 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 30 Jul 2009 08:21:11 +0000 (08:21 +0000)
Originally committed as revision 19538 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/img2.c

index ec32f86..a90381d 100644 (file)
@@ -260,6 +260,8 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
         if (s1->loop_input && s->img_number > s->img_last) {
             s->img_number = s->img_first;
         }
+        if (s->img_number > s->img_last)
+            return AVERROR_EOF;
         if (av_get_frame_filename(filename, sizeof(filename),
                                   s->path, s->img_number)<0 && s->img_number > 1)
             return AVERROR(EIO);