]> git.sesse.net Git - ffmpeg/commitdiff
img2dec: fix -loop
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Jan 2013 19:06:09 +0000 (20:06 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Jan 2013 19:07:16 +0000 (20:07 +0100)
This fixes a infinite loop with -loop and -vframes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/img2dec.c

index de8a64fce429d25310bddb06bb225e2d1103262a..c3f5bdbd01e667bcc4b9e6de0efffe1b81f58a8b 100644 (file)
@@ -393,7 +393,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
         return AVERROR(ENOMEM);
     pkt->stream_index = 0;
     pkt->flags       |= AV_PKT_FLAG_KEY;
-    if (!s->is_pipe)
+    if (!s->is_pipe && !s->loop)
         pkt->pts      = s->img_number - s->img_first;
 
     pkt->size = 0;