calculate default_duration according to framerate only when not already set

Originally committed as revision 10125 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2007-08-16 21:54:04 +00:00
parent 2f4d5971dc
commit a92d20629c

View File

@ -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;
}