diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index ee4239234403c313b817b508b676ba4f88e832fd..1cca2929b4a76bc092d69844dced180323522747 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -2209,6 +2209,10 @@ matroska_read_header (AVFormatContext    *s,
 
             st->codec->codec_id = codec_id;
 
+            if (track->default_duration)
+                av_reduce(&st->codec->time_base.num, &st->codec->time_base.den,
+                          track->default_duration, 1000000000, 30000);
+
             if(extradata){
                 st->codec->extradata = extradata;
                 st->codec->extradata_size = extradata_size;