summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2021-01-16 09:42:01 +0100
committerMarton Balint <cus@passwd.hu>2021-01-23 19:54:14 +0100
commit16766bf8a8e477da09337801b96f732740a0b279 (patch)
tree41a9e3f48bff0016072e8ce77adf05e3dbf87d99 /libavutil
parentb8cd37a59fe249daf9d84cb0d4ea0a6f42d208af (diff)
Revert "avutil/timecode: fix sscanf format string with garbage at the end"
This reverts commit 6696a07ac62bfec49dd488510a719367918b9f7a. It is wrong to restrict timecodes to always contain leading zeros or for hours or frames to be 2 chars only. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/timecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/timecode.c b/libavutil/timecode.c
index 280e4cacfb..b1b504edbf 100644
--- a/libavutil/timecode.c
+++ b/libavutil/timecode.c
@@ -252,7 +252,7 @@ int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *st
char c;
int hh, mm, ss, ff, flags;
- if (sscanf(str, "%02u:%02u:%02u%c%02u", &hh, &mm, &ss, &c, &ff) != 5) {
+ if (sscanf(str, "%d:%d:%d%c%d", &hh, &mm, &ss, &c, &ff) != 5) {
av_log(log_ctx, AV_LOG_ERROR, "Unable to parse timecode, "
"syntax: hh:mm:ss[:;.]ff\n");
return AVERROR_INVALIDDATA;