msdk: jpegdec: Fix non-interleaved sample decode

Using the default value (InterleavedDec == MFX_SCANTYPE_UNKNOWN)
causing issues with non-interleaved sample decode. Ideally the usage
of MFXVideoDECODE_DecodeHeader should fix these type of issue, but
it seems to be not. But hardcoding the InterleaveDec to
MFX_SCANTYPE_NONINTERLEAVED
is fixing the problem and fortunately msdk seems to be taking care of
Interleaved samples
too .So let's hardcode it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=793787
This commit is contained in:
Sreerenj Balachandran 2018-04-16 14:37:21 -08:00
parent 9a090538be
commit 142ad9dbad

View file

@ -62,6 +62,14 @@ static gboolean
gst_msdkmjpegdec_configure (GstMsdkDec * decoder)
{
decoder->param.mfx.CodecId = MFX_CODEC_JPEG;
/* HACK to make sure MSDK won't crash while handling non-interleaved samples */
/* setting MFX_SCANTYPE_UNKNOWN (== 0) causing issues for
non-interleaved samples. Usage of MFXVideoDECODE_DecodeHeader
also doesn't seems to fix the issue. But even if we hardcode
the InterleaveDec to MFX_SCANTYPE_NONINTERLEAVED, msdk seems to be taking care
of Interleaved samples, so let's hardcode it for now */
decoder->param.mfx.InterleavedDec = MFX_SCANTYPE_NONINTERLEAVED;
return TRUE;
}