mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 06:22:29 +00:00
omxaudioenc: Make srcpad caps setting threadsafe
This commit is contained in:
parent
0a4e222e60
commit
1ab4e4b945
1 changed files with 4 additions and 0 deletions
|
@ -421,10 +421,12 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Port settings have changed, updating caps");
|
||||
|
||||
GST_BASE_AUDIO_ENCODER_STREAM_LOCK (self);
|
||||
caps = klass->get_caps (self, self->out_port, state);
|
||||
if (!caps) {
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_AUDIO_ENCODER_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
}
|
||||
|
||||
|
@ -432,9 +434,11 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self)
|
|||
gst_caps_unref (caps);
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_AUDIO_ENCODER_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
}
|
||||
gst_caps_unref (caps);
|
||||
GST_BASE_AUDIO_ENCODER_STREAM_UNLOCK (self);
|
||||
|
||||
/* Now get a buffer */
|
||||
if (acq_return != GST_OMX_ACQUIRE_BUFFER_OK)
|
||||
|
|
Loading…
Reference in a new issue