[FFmpeg-devel] [PATCH] Revert "matroskadec: don't set codec timebase."

dalecurtis at chromium.org dalecurtis at chromium.org
Fri Apr 13 02:26:23 CEST 2012


From: Dale Curtis <dalecurtis at chromium.org>

This commit introduced a regression in the amount of upfront
data required to identify and parse a webm container.  Most
visible under constrained networks: http://goo.gl/isfLc

This reverts commit c98c1f434eed06390f4990dd23f7ec15dbe53703.
---
 libavformat/matroskadec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 6d7401b..5d5bd5d 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1628,6 +1628,10 @@ static int matroska_read_header(AVFormatContext *s)
         if (track->flag_forced)
             st->disposition |= AV_DISPOSITION_FORCED;
 
+        if (track->default_duration)
+            av_reduce(&st->codec->time_base.num, &st->codec->time_base.den,
+                      track->default_duration, 1000000000, 30000);
+
         if (!st->codec->extradata) {
             if(extradata){
                 st->codec->extradata = extradata;
-- 
1.7.7.3



More information about the ffmpeg-devel mailing list