Commit 060c6c46 authored by wm4's avatar wm4 Committed by Clément Bœsch

avformat/mpl2dec: handle files with CRLF linebreaks correctly

Skip the "\r" as normal text. Otherwise it will be the first character
of the string passed to sscanf(), which then fill fail to match the
timestamps.
Signed-off-by: 's avatarClément Bœsch <u@pkh.me>
parent 902a5fa7
......@@ -43,7 +43,7 @@ static int mpl2_probe(AVProbeData *p)
if (sscanf(ptr, "[%"SCNd64"][%"SCNd64"]%c", &start, &end, &c) != 3 &&
sscanf(ptr, "[%"SCNd64"][]%c", &start, &c) != 2)
return 0;
ptr += strcspn(ptr, "\r\n") + 1;
ptr += strcspn(ptr, "\n") + 1;
if (ptr >= ptr_end)
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment