mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 12:00:06 +01: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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user