From a92d20629c6fc79c8adc80a7fd1a2847dc8c4656 Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Thu, 16 Aug 2007 21:54:04 +0000
Subject: [PATCH] calculate default_duration according to framerate only when
 not already set

Originally committed as revision 10125 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/matroskadec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ace99179293..b6a98931efa 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1099,6 +1099,7 @@ matroska_add_stream (MatroskaDemuxContext *matroska)
                             if ((res = ebml_read_float(matroska, &id,
                                                        &num)) < 0)
                                 break;
+                            if (!track->default_duration)
                             track->default_duration = 1000000000/(matroska->time_scale*num);
                             break;
                         }
-- 
GitLab