mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
msdkdec: Fix some lock issue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3947>
This commit is contained in:
parent
b88b323e04
commit
4e60e91a05
2 changed files with 4 additions and 2 deletions
|
@ -393,8 +393,8 @@ gst_msdkdec_init_decoder (GstMsdkDec * thiz)
|
|||
thiz->param.AsyncDepth = thiz->async_depth;
|
||||
|
||||
/* We expect msdk to fill the width and height values */
|
||||
g_return_val_if_fail (thiz->param.mfx.FrameInfo.Width
|
||||
&& thiz->param.mfx.FrameInfo.Height, FALSE);
|
||||
if (!(thiz->param.mfx.FrameInfo.Width && thiz->param.mfx.FrameInfo.Height))
|
||||
goto failed;
|
||||
|
||||
klass->preinit_decoder (thiz);
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ static gboolean
|
|||
gst_msdkmjpegdec_post_configure (GstMsdkDec * decoder)
|
||||
{
|
||||
/* Set the output color format based on the input color format */
|
||||
GST_OBJECT_LOCK (decoder);
|
||||
switch (decoder->param.mfx.JPEGChromaFormat) {
|
||||
case MFX_CHROMAFORMAT_YUV422:
|
||||
decoder->param.mfx.FrameInfo.FourCC = MFX_FOURCC_YUY2;
|
||||
|
@ -116,6 +117,7 @@ gst_msdkmjpegdec_post_configure (GstMsdkDec * decoder)
|
|||
break;
|
||||
}
|
||||
|
||||
GST_OBJECT_UNLOCK (decoder);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue