mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
dvdspu: Make GAP event aware
This commit is contained in:
parent
211828979b
commit
463ac4c12f
1 changed files with 16 additions and 0 deletions
|
@ -1117,6 +1117,22 @@ gst_dvd_spu_subpic_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_GAP:
|
||||
{
|
||||
GstClockTime timestamp, duration;
|
||||
gst_event_parse_gap (event, ×tamp, &duration);
|
||||
if (GST_CLOCK_TIME_IS_VALID (duration))
|
||||
timestamp += duration;
|
||||
|
||||
DVD_SPU_LOCK (dvdspu);
|
||||
dvdspu->subp_seg.position = timestamp;
|
||||
GST_LOG_OBJECT (dvdspu, "Received GAP. Segment now: %" GST_SEGMENT_FORMAT,
|
||||
&dvdspu->subp_seg);
|
||||
DVD_SPU_UNLOCK (dvdspu);
|
||||
|
||||
gst_event_unref (event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_START:
|
||||
gst_event_unref (event);
|
||||
goto done;
|
||||
|
|
Loading…
Reference in a new issue