mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
omxvideodec: Make srcpad caps setting threadsafe
This commit is contained in:
parent
f0775fac6f
commit
30d2f970f9
1 changed files with 5 additions and 0 deletions
|
@ -645,6 +645,7 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Port settings have changed, updating caps");
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||
gst_omx_port_get_port_definition (port, &port_def);
|
||||
g_assert (port_def.format.video.eCompressionFormat ==
|
||||
OMX_VIDEO_CodingUnused);
|
||||
|
@ -661,6 +662,7 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
|
|||
port_def.format.video.eColorFormat);
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
break;
|
||||
}
|
||||
|
@ -673,9 +675,12 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
|
|||
if (!gst_base_video_decoder_set_src_caps (GST_BASE_VIDEO_DECODER (self))) {
|
||||
if (buf)
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self);
|
||||
goto caps_failed;
|
||||
}
|
||||
|
||||
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