diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-08 21:22:17 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-08 21:22:17 +0100 |
commit | 3cc77d4dd6eb9803333c0267dabbdca895a38ed7 (patch) | |
tree | 4cd4eb9d7b5f7ea3a61fbb109841a5fdeb7a4dc8 /gst | |
parent | 81fb90748fe9f141aabf8c569f478d451cd33e09 (diff) | |
download | gst-plugins-bad-3cc77d4dd6eb9803333c0267dabbdca895a38ed7.tar.gz gst-plugins-bad-3cc77d4dd6eb9803333c0267dabbdca895a38ed7.tar.bz2 gst-plugins-bad-3cc77d4dd6eb9803333c0267dabbdca895a38ed7.zip |
mxfdemux: Correctly handle DURATION queries with a negative duration
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfdemux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 2ff8170e..0753d974 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -3359,7 +3359,10 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) } duration = mxfpad->material_track->parent.sequence->duration; - if (format == GST_FORMAT_TIME) { + if (duration <= -1) + duration = -1; + + if (duration != -1 && format == GST_FORMAT_TIME) { if (mxfpad->material_track->edit_rate.n == 0 || mxfpad->material_track->edit_rate.d == 0) { g_mutex_unlock (demux->metadata_lock); @@ -3619,7 +3622,7 @@ gst_mxf_demux_query (GstElement * element, GstQuery * query) pdur = pad->material_track->parent.sequence->duration; if (pad->material_track->edit_rate.n == 0 || - pad->material_track->edit_rate.d == 0) + pad->material_track->edit_rate.d == 0 || pdur <= -1) continue; pdur = |