Commit 82c0f901 authored by He Junyan's avatar He Junyan
Browse files

va: Make the caps pointer operation atomic in vadecoder.

The vadecoder's srcpad_caps and sinkpad_caps pointers are outside of the
mutex protection. Just make all operation for them atomic.

Part-of: <gstreamer/gst-plugins-bad!1957>
parent 6b1e1924
......@@ -373,7 +373,7 @@ gst_va_decoder_get_srcpad_caps (GstVaDecoder * self)
g_return_val_if_fail (GST_IS_VA_DECODER (self), FALSE);
if (self->srcpad_caps)
if (g_atomic_pointer_get (&self->srcpad_caps))
return gst_caps_ref (self->srcpad_caps);
if (_get_codec_caps (self))
......@@ -396,7 +396,7 @@ gst_va_decoder_get_sinkpad_caps (GstVaDecoder * self)
{
g_return_val_if_fail (GST_IS_VA_DECODER (self), FALSE);
if (self->sinkpad_caps)
if (g_atomic_pointer_get (&self->sinkpad_caps))
return gst_caps_ref (self->sinkpad_caps);
if (_get_codec_caps (self))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment