diff options
author | Robert Swain <robert.swain@collabora.co.uk> | 2010-02-16 14:44:11 +0100 |
---|---|---|
committer | Robert Swain <robert.swain@collabora.co.uk> | 2010-02-16 14:44:11 +0100 |
commit | e2f5409d40e8d475563a0cd294e590519306b993 (patch) | |
tree | 02838f12a768f74294181636b6b833119ea11e7f /gst | |
parent | 0134e950fad6af92ecaf56c7bc95329ec93ff1df (diff) |
qtdemux: Fix frame rate cap regression
Look for a non-zero min_duration during initialisation to avoid
incorrect frame rate caps.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |