mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-02 14:20:06 +00:00
wasapi: Fix double call to Start when resetting the element
When either the source or sink goes from PLAYING -> NULL -> PLAYING, we call _reset() which sets client_needs_restart, and then we call prepare() which calls IAudioClient_Start(), so we don't need to call it again in src_read() or sink_write(). Unlike when we're just going PLAYING -> PAUSED -> PLAYING.
This commit is contained in:
parent
2f05ee9ba9
commit
8249763f6c
2 changed files with 2 additions and 0 deletions
sys/wasapi
|
@ -557,6 +557,7 @@ gst_wasapi_sink_prepare (GstAudioSink * asink, GstAudioRingBufferSpec * spec)
|
|||
|
||||
hr = IAudioClient_Start (self->client);
|
||||
HR_FAILED_GOTO (hr, IAudioClient::Start, beach);
|
||||
self->client_needs_restart = FALSE;
|
||||
|
||||
gst_audio_ring_buffer_set_channel_positions (GST_AUDIO_BASE_SINK
|
||||
(self)->ringbuffer, self->positions);
|
||||
|
|
|
@ -508,6 +508,7 @@ gst_wasapi_src_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
|
|||
|
||||
hr = IAudioClient_Start (self->client);
|
||||
HR_FAILED_GOTO (hr, IAudioClock::Start, beach);
|
||||
self->client_needs_restart = FALSE;
|
||||
|
||||
gst_audio_ring_buffer_set_channel_positions (GST_AUDIO_BASE_SRC
|
||||
(self)->ringbuffer, self->positions);
|
||||
|
|
Loading…
Reference in a new issue