diff options
author | Liviu Oniciuc <klmno.dev@gmx.com> | 2015-02-03 09:01:29 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-03 18:57:23 +0100 |
commit | b37858eae186ff84afd38cf3e845ba6e037e6397 (patch) | |
tree | c204d5bbf07706a75e846096ea7d400171099edb /libavformat/utils.c | |
parent | 6a0cd529a35190d9374b0b26504e71857cd67b83 (diff) | |
download | ffmpeg-b37858eae186ff84afd38cf3e845ba6e037e6397.tar.gz |
avformat/img2dec: remove the non-negative number requirement for start_number option
industrial cameras usually mark the trigger frame as frame number 0
all frames saved before trigger frame receive a negative sequence number
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rwxr-xr-x[-rw-r--r--] | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 570603a725..e44b45cefb 100644..100755 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3827,6 +3827,8 @@ int av_get_frame_filename(char *buf, int buf_size, const char *path, int number) if (percentd_found) goto fail; percentd_found = 1; + if(number < 0) + nd += 1; snprintf(buf1, sizeof(buf1), "%0*d", nd, number); len = strlen(buf1); if ((q - buf + len) > buf_size - 1) |