mxfdemux: Fix logic for finding the previous keyframe

This commit is contained in:
Sebastian Dröge 2009-02-06 10:06:59 +01:00
parent 6208795598
commit 22cb259f19

View file

@ -2268,8 +2268,8 @@ gst_mxf_demux_find_essence_element (GstMXFDemux * demux,
guint i; guint i;
GST_DEBUG_OBJECT (demux, "Trying to find essence element %" G_GINT64_FORMAT GST_DEBUG_OBJECT (demux, "Trying to find essence element %" G_GINT64_FORMAT
" of track %u with body_sid %u", *position, etrack->track_number, " of track %u with body_sid %u (keyframe %d)", *position,
etrack->body_sid); etrack->track_number, etrack->body_sid, keyframe);
from_index: from_index:
@ -2293,12 +2293,15 @@ from_index:
idx = idx =
&g_array_index (etrack->offsets, GstMXFDemuxIndex, &g_array_index (etrack->offsets, GstMXFDemuxIndex,
current_position); current_position);
if (idx->offset == 0) if (idx->offset == 0) {
break; break;
else if (!idx->keyframe) } else if (!idx->keyframe) {
current_position--;
continue; continue;
} else {
current_offset = idx->offset; current_offset = idx->offset;
break;
}
} }
} }