]> git.sesse.net Git - ffmpeg/commitdiff
avformat/matroskadec: add a warning when the track TimestampScale won't be used
authorSteve Lhomme <robux4@ycbcr.xyz>
Sun, 15 Nov 2020 08:59:47 +0000 (09:59 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 20 Nov 2020 14:20:24 +0000 (15:20 +0100)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/matroskadec.c

index 981e044263cddaf66144fdadf08af25920d496c9..ba0e2956df6416a90842ce78a0b1ecd04c6548ee 100644 (file)
@@ -2672,8 +2672,12 @@ static int matroska_parse_tracks(AVFormatContext *s)
             av_log(matroska->ctx, AV_LOG_INFO,
                    "Unknown/unsupported AVCodecID %s.\n", track->codec_id);
 
-        if (track->time_scale < 0.01)
+        if (track->time_scale < 0.01) {
+            av_log(matroska->ctx, AV_LOG_WARNING,
+                   "Track TimestampScale too small %f, assuming 1.0.\n",
+                   track->time_scale);
             track->time_scale = 1.0;
+        }
         avpriv_set_pts_info(st, 64, matroska->time_scale * track->time_scale,
                             1000 * 1000 * 1000);    /* 64 bit pts in ns */