diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-06 10:06:59 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-06 10:06:59 +0100 |
commit | 22cb259f197c91d8d6e339bb765a74c023fc7775 (patch) | |
tree | 2b8c5d7db82163f70e3bcff4df5ac524e09ba35d /gst/mxf | |
parent | 6208795598029c4e902c923434100e91d3ce2398 (diff) | |
download | gst-plugins-bad-22cb259f197c91d8d6e339bb765a74c023fc7775.tar.gz gst-plugins-bad-22cb259f197c91d8d6e339bb765a74c023fc7775.tar.bz2 gst-plugins-bad-22cb259f197c91d8d6e339bb765a74c023fc7775.zip |
mxfdemux: Fix logic for finding the previous keyframe
Diffstat (limited to 'gst/mxf')
-rw-r--r-- | gst/mxf/mxfdemux.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 6fe2f279..9cbbc2b0 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -2268,8 +2268,8 @@ gst_mxf_demux_find_essence_element (GstMXFDemux * demux, guint i; GST_DEBUG_OBJECT (demux, "Trying to find essence element %" G_GINT64_FORMAT - " of track %u with body_sid %u", *position, etrack->track_number, - etrack->body_sid); + " of track %u with body_sid %u (keyframe %d)", *position, + etrack->track_number, etrack->body_sid, keyframe); from_index: @@ -2293,12 +2293,15 @@ from_index: idx = &g_array_index (etrack->offsets, GstMXFDemuxIndex, current_position); - if (idx->offset == 0) + if (idx->offset == 0) { break; - else if (!idx->keyframe) + } else if (!idx->keyframe) { + current_position--; continue; - - current_offset = idx->offset; + } else { + current_offset = idx->offset; + break; + } } } |