[FFmpeg-cvslog] img2dec: correctly use the parsed value from -start_number

Vittorio Giovara git at videolan.org
Thu Jan 15 02:36:26 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Jan  6 16:47:18 2015 +0100| [456ffec35d55288d589aa1901919e038c3427f30] | committer: Vittorio Giovara

img2dec: correctly use the parsed value from -start_number

Previously the image sequence was always starting from the minimum
number rather than the requested one.

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=456ffec35d55288d589aa1901919e038c3427f30
---

 libavformat/img2dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index f7f0a11..b73554e 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -194,7 +194,7 @@ static int img_read_header(AVFormatContext *s1)
             return AVERROR(ENOENT);
         s->img_first  = first_index;
         s->img_last   = last_index;
-        s->img_number = first_index;
+        s->img_number = s->start_number != 1 ? s->start_number : first_index;
         /* compute duration */
         st->start_time = 0;
         st->duration   = last_index - first_index + 1;



More information about the ffmpeg-cvslog mailing list