mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
audiosrc: return FALSE when receiving a SEEK event
When receiving a seek event, return FALSE as we don't implement seeking.
This commit is contained in:
parent
79adfa544d
commit
a5491ba218
1 changed files with 11 additions and 1 deletions
|
@ -663,21 +663,31 @@ static gboolean
|
|||
gst_base_audio_src_event (GstBaseSrc * bsrc, GstEvent * event)
|
||||
{
|
||||
GstBaseAudioSrc *src = GST_BASE_AUDIO_SRC (bsrc);
|
||||
gboolean res;
|
||||
|
||||
res = TRUE;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
GST_DEBUG_OBJECT (bsrc, "flush-start");
|
||||
gst_ring_buffer_pause (src->ringbuffer);
|
||||
gst_ring_buffer_clear_all (src->ringbuffer);
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
GST_DEBUG_OBJECT (bsrc, "flush-stop");
|
||||
/* always resync on sample after a flush */
|
||||
src->next_sample = -1;
|
||||
gst_ring_buffer_clear_all (src->ringbuffer);
|
||||
break;
|
||||
case GST_EVENT_SEEK:
|
||||
GST_DEBUG_OBJECT (bsrc, "refuse to seek");
|
||||
res = FALSE;
|
||||
break;
|
||||
default:
|
||||
GST_DEBUG_OBJECT (bsrc, "dropping event %p", event);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return res;
|
||||
}
|
||||
|
||||
/* get the next offset in the ringbuffer for reading samples.
|
||||
|
|
Loading…
Reference in a new issue