avformat/lrcdec: use av_sscanf to avoid possible locale issues

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow 2025-08-11 20:27:10 +02:00
parent c74bc74398
commit db05b656b8
No known key found for this signature in database
GPG key ID: 6580132338ABD4E2

View file

@ -88,7 +88,7 @@ static int64_t read_ts(const char *p, int64_t *start)
if(p[offset] != '[') {
return 0;
}
int ret = sscanf(p, "%2[[-]%"SCNu32":%lf]", prefix, &mm, &ss);
int ret = av_sscanf(p, "%2[[-]%"SCNu32":%lf]", prefix, &mm, &ss);
if (ret != 3 || prefix[0] != '[' || ss < 0 || ss > 60) {
return 0;
}