mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
audiorate: Fill gap events
https://bugzilla.gnome.org/show_bug.cgi?id=741281
This commit is contained in:
parent
d226d45d2f
commit
4713694082
1 changed files with 10 additions and 1 deletions
|
@ -337,10 +337,19 @@ gst_audio_rate_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
res = gst_pad_push_event (audiorate->srcpad, event);
|
res = gst_pad_push_event (audiorate->srcpad, event);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_GAP:
|
case GST_EVENT_GAP:
|
||||||
/* no gaps after audiorate, ignore the event */
|
{
|
||||||
|
/* Fill until end of gap */
|
||||||
|
GstClockTime timestamp, duration;
|
||||||
|
gst_event_parse_gap (event, ×tamp, &duration);
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
|
||||||
|
if (GST_CLOCK_TIME_IS_VALID (duration))
|
||||||
|
timestamp += duration;
|
||||||
|
gst_audio_rate_fill_to_time (audiorate, timestamp);
|
||||||
|
}
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
res = gst_pad_event_default (pad, parent, event);
|
res = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue