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>
This commit is contained in:
Gyan Doshi 2021-12-07 17:26:05 +05:30
parent 9f717ca92f
commit a454dfacd5

View File

@ -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) {