[FFmpeg-cvslog] lavf/img2dec: fix weird start_number count logic
Stefano Sabatini
git at videolan.org
Sun Aug 5 00:40:10 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Aug 4 16:54:18 2012 +0200| [a30e776ff153d678811dabbcc6fc7523910e2935] | committer: Stefano Sabatini
lavf/img2dec: fix weird start_number count logic
This seems consistent with the assumed meaning of the option.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a30e776ff153d678811dabbcc6fc7523910e2935
---
libavformat/img2dec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 2844ae0..24006a8 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -253,7 +253,7 @@ static int read_header(AVFormatContext *s1)
#endif
} else {
if (find_image_range(&first_index, &last_index, s->path,
- s->start_number - 1) < 0)
+ s->start_number) < 0)
return AVERROR(ENOENT);
}
s->img_first = first_index;
@@ -377,7 +377,7 @@ static const AVOption options[] = {
{ "video_size", "", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC },
{ "loop", "", OFFSET(loop), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, DEC },
- { "start_number", "first number in the sequence", OFFSET(start_number), AV_OPT_TYPE_INT, {.dbl = 1}, 1, INT_MAX, DEC },
+ { "start_number", "first number in the sequence", OFFSET(start_number), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, DEC },
{ NULL },
};
More information about the ffmpeg-cvslog
mailing list