mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-06 15:38:50 +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;
|
GstVideoState *state = &GST_BASE_VIDEO_CODEC (self)->state;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
|
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Port settings have changed, updating caps");
|
GST_DEBUG_OBJECT (self, "Port settings have changed, updating caps");
|
||||||
|
|
||||||
caps = klass->get_caps (self, self->out_port, state);
|
caps = klass->get_caps (self, self->out_port, state);
|
||||||
if (!caps) {
|
if (!caps) {
|
||||||
if (buf)
|
if (buf)
|
||||||
gst_omx_port_release_buffer (self->out_port, buf);
|
gst_omx_port_release_buffer (self->out_port, buf);
|
||||||
|
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||||
goto caps_failed;
|
goto caps_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -740,10 +743,13 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
if (buf)
|
if (buf)
|
||||||
gst_omx_port_release_buffer (self->out_port, buf);
|
gst_omx_port_release_buffer (self->out_port, buf);
|
||||||
|
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||||
goto caps_failed;
|
goto caps_failed;
|
||||||
}
|
}
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||||
|
|
||||||
/* Now get a buffer */
|
/* Now get a buffer */
|
||||||
if (acq_return != GST_OMX_ACQUIRE_BUFFER_OK)
|
if (acq_return != GST_OMX_ACQUIRE_BUFFER_OK)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue