mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
mxfdemux: Fix logic for finding the previous keyframe
This commit is contained in:
parent
6208795598
commit
22cb259f19
1 changed files with 9 additions and 6 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue