mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avformat/utils: support arbitrary path lengths for av_filename_number_test
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
9458a6f8ec
commit
4b8be1991c
1 changed files with 6 additions and 3 deletions
|
|
@ -116,9 +116,12 @@ int av_append_packet(AVIOContext *s, AVPacket *pkt, int size)
|
||||||
|
|
||||||
int av_filename_number_test(const char *filename)
|
int av_filename_number_test(const char *filename)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
AVBPrint bp;
|
||||||
return filename &&
|
|
||||||
(av_get_frame_filename(buf, sizeof(buf), filename, 1) >= 0);
|
if (!filename)
|
||||||
|
return 0;
|
||||||
|
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_COUNT_ONLY);
|
||||||
|
return (ff_bprint_get_frame_filename(&bp, filename, 1, AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION) >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue