qtdemux: fix key unit seek

Unlike many other seek flags, the KEY_UNIT seek
flag is not copied over into the GstSegment,
since it's only relevant for the seek itself,
so we need to pass it explicitly to the seek
handler here.

https://bugzilla.gnome.org/show_bug.cgi?id=745339
This commit is contained in:
Matej Knopp 2015-02-28 18:10:06 +01:00 committed by Tim-Philipp Müller
parent bc6d68c93a
commit f75e443a7a

View file

@ -1393,7 +1393,7 @@ no_format:
*/
static gboolean
gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment,
guint32 seqnum)
guint32 seqnum, GstSeekFlags flags)
{
gint64 desired_offset;
gint n;
@ -1406,7 +1406,7 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment,
/* may not have enough fragmented info to do this adjustment,
* and we can't scan (and probably should not) at this time with
* possibly flushing upstream */
if ((segment->flags & GST_SEEK_FLAG_KEY_UNIT) && !qtdemux->fragmented) {
if ((flags & GST_SEEK_FLAG_KEY_UNIT) && !qtdemux->fragmented) {
gint64 min_offset;
gst_qtdemux_adjust_seek (qtdemux, desired_offset, TRUE, &min_offset, NULL);
@ -1507,7 +1507,7 @@ gst_qtdemux_do_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event)
}
/* now do the seek, this actually never returns FALSE */
gst_qtdemux_perform_seek (qtdemux, &seeksegment, seqnum);
gst_qtdemux_perform_seek (qtdemux, &seeksegment, seqnum, flags);
/* prepare for streaming again */
if (flush) {