diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2021-12-07 17:26:05 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2021-12-07 17:50:55 +0530 |
commit | a454dfacd560e40fa5fea796f0d5b437f78e54e4 (patch) | |
tree | 9a3ba46eb065a4fc76ca831a44e7a1426df95653 /libavformat/concat.c | |
parent | 9f717ca92f77d94e9ac3e5676e5622c6ba847dc4 (diff) | |
download | ffmpeg-a454dfacd560e40fa5fea796f0d5b437f78e54e4.tar.gz |
avformat/concatf: ignore trailing whitespaces
The concatf protocol returns an opaque error on open if
concatf list file contains trailing newlines.
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
Reviewed-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/concat.c')
-rw-r--r-- | libavformat/concat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/concat.c b/libavformat/concat.c index 2560811ff9..faeba2293a 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -245,6 +245,10 @@ static av_cold int concatf_open(URLContext *h, const char *uri, int flags) char *node_uri; int64_t size; size_t len = i; + int leading_spaces = strspn(cursor, " \n\t\r"); + + if (!cursor[leading_spaces]) + break; node_uri = av_get_token(&cursor, "\r\n"); if (!node_uri) { |