img2dec: fix -loop

This fixes a infinite loop with -loop and -vframes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-08 20:06:09 +01:00
parent 0b68ebc4b6
commit 252316c885

View 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;