mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
omxvideoenc: Make srcpad caps setting threadsafe
This commit is contained in:
parent
30d2f970f9
commit
0a4e222e60
1 changed files with 6 additions and 0 deletions
|
@ -727,12 +727,15 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self)
|
|||
GstVideoState *state = &GST_BASE_VIDEO_CODEC (self)->state;
|
||||
GstCaps *caps;
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Port settings have changed, updating caps");
|
||||
|
||||
caps = klass->get_caps (self, self->out_port, state);
|
||||
if (!caps) {
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
}
|
||||
|
||||
|
@ -740,10 +743,13 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self)
|
|||
gst_caps_unref (caps);
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
}
|
||||
gst_caps_unref (caps);
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
|
||||
/* Now get a buffer */
|
||||
if (acq_return != GST_OMX_ACQUIRE_BUFFER_OK)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue