changeset 2387:108c29584787 libavformat

calculate default_duration according to framerate only when not already set
author aurel
date Thu, 16 Aug 2007 21:54:04 +0000
parents 2beaa59babad
children 338cb0b4e0da
files matroskadec.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Thu Aug 16 12:07:05 2007 +0000
+++ b/matroskadec.c	Thu Aug 16 21:54:04 2007 +0000
@@ -1099,6 +1099,7 @@
                             if ((res = ebml_read_float(matroska, &id,
                                                        &num)) < 0)
                                 break;
+                            if (!track->default_duration)
                             track->default_duration = 1000000000/(matroska->time_scale*num);
                             break;
                         }