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>
pull/375/head
Gyan Doshi 3 years ago
parent 9f717ca92f
commit a454dfacd5
  1. 4
      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) {

Loading…
Cancel
Save