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>
This commit is contained in:

committed by
Michael Niedermayer

parent
6a0cd529a3
commit
b37858eae1
2
libavformat/utils.c
Normal file → Executable file
2
libavformat/utils.c
Normal file → Executable file
@@ -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)
|
||||
|
Reference in New Issue
Block a user