[FFmpeg-cvslog] avformat/concatf: ignore trailing whitespaces
Gyan Doshi
git at videolan.org
Tue Dec 7 14:22:10 EET 2021
ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Tue Dec 7 17:44:05 2021 +0530| [a454dfacd560e40fa5fea796f0d5b437f78e54e4] | committer: Gyan Doshi
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 at gyani.pro>
Reviewed-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a454dfacd560e40fa5fea796f0d5b437f78e54e4
---
libavformat/concat.c | 4 ++++
1 file changed, 4 insertions(+)
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) {
More information about the ffmpeg-cvslog
mailing list