From e2f5409d40e8d475563a0cd294e590519306b993 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Tue, 16 Feb 2010 14:44:11 +0100 Subject: qtdemux: Fix frame rate cap regression Look for a non-zero min_duration during initialisation to avoid incorrect frame rate caps. --- gst/qtdemux/qtdemux.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gst') diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index e18b82a80..055e8f863 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -5902,6 +5902,16 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) || !qtdemux_parse_samples (qtdemux, stream, 0)) goto samples_failed; + /* look for non-zero min_duration as it is used to set the frame rate cap */ + if (G_UNLIKELY (stream->min_duration == 0)) { + guint32 sample_num = 1; + + while (sample_num <= stream->n_samples && stream->min_duration == 0) { + if (!qtdemux_parse_samples (qtdemux, stream, sample_num)) + goto samples_failed; + ++sample_num; + } + } /* configure segments */ if (!qtdemux_parse_segments (qtdemux, stream, trak)) goto segments_failed; -- cgit v1.2.3