mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
decklinkaudiosink: Fix playback when video caps is configured before audio
Scheduled playback starts on videosink's state change or on caps but it's possible that audiosink is configure without caps yet. Try start scheduled playback on audiosink's caps event as well Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4364>
This commit is contained in:
parent
07cf7b2a29
commit
7117cba831
1 changed files with 6 additions and 0 deletions
|
@ -332,9 +332,11 @@ gst_decklink_audio_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||
sample_depth = bmdAudioSampleType32bitInteger;
|
||||
}
|
||||
|
||||
g_mutex_lock (&self->output->lock);
|
||||
ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz,
|
||||
sample_depth, info.channels, bmdAudioOutputStreamContinuous);
|
||||
if (ret != S_OK) {
|
||||
g_mutex_unlock (&self->output->lock);
|
||||
GST_WARNING_OBJECT (self, "Failed to enable audio output 0x%08lx",
|
||||
(unsigned long) ret);
|
||||
return FALSE;
|
||||
|
@ -343,6 +345,10 @@ gst_decklink_audio_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||
self->output->audio_enabled = TRUE;
|
||||
self->info = info;
|
||||
|
||||
if (self->output->start_scheduled_playback && self->output->videosink)
|
||||
self->output->start_scheduled_playback (self->output->videosink);
|
||||
g_mutex_unlock (&self->output->lock);
|
||||
|
||||
// Create a new resampler as needed
|
||||
if (self->resampler)
|
||||
gst_audio_resampler_free (self->resampler);
|
||||
|
|
Loading…
Reference in a new issue