[FFmpeg-cvslog] avformat/matroskadec: add a warning when the track TimestampScale won't be used
Steve Lhomme
git at videolan.org
Fri Nov 20 17:02:15 EET 2020
ffmpeg | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sun Nov 15 09:59:47 2020 +0100| [b00d2210e4526dbee22e305f209d523046b073b2] | committer: Anton Khirnov
avformat/matroskadec: add a warning when the track TimestampScale won't be used
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b00d2210e4526dbee22e305f209d523046b073b2
---
libavformat/matroskadec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 981e044263..ba0e2956df 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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 */
More information about the ffmpeg-cvslog
mailing list