From f0003ac97e447256432fcaa91c77559675a0d544 Mon Sep 17 00:00:00 2001 From: maxd Date: Sat, 5 Oct 2013 22:24:07 +0000 Subject: QSV: fix for stream(s) with no-SPS available git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5821 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- contrib/ffmpeg/A00-qsv.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'contrib/ffmpeg/A00-qsv.patch') diff --git a/contrib/ffmpeg/A00-qsv.patch b/contrib/ffmpeg/A00-qsv.patch index 076693a01..565f098f7 100644 --- a/contrib/ffmpeg/A00-qsv.patch +++ b/contrib/ffmpeg/A00-qsv.patch @@ -1234,10 +1234,10 @@ index 0000000..52378cf +#endif //AVCODEC_QSV_H diff --git a/libavcodec/qsv_h264.c b/libavcodec/qsv_h264.c new file mode 100644 -index 0000000..ac9db63 +index 0000000..6f22b34 --- /dev/null +++ b/libavcodec/qsv_h264.c -@@ -0,0 +1,974 @@ +@@ -0,0 +1,983 @@ +/* ********************************************************************* *\ + +Copyright (C) 2013 Intel Corporation. All rights reserved. @@ -1418,7 +1418,16 @@ index 0000000..ac9db63 + + sts = MFXVideoDECODE_DecodeHeader(qsv->mfx_session, &qsv_decode->bs, + &qsv_decode->m_mfxVideoParam); ++ if (sts <= MFX_ERR_NONE) ++ { ++ av_log(avctx, AV_LOG_QUIET,"DecodeHeader failed with result:%d\n",sts); ++ sts = MFX_ERR_NONE; + ++ qsv_decode->m_mfxVideoParam.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12; ++ qsv_decode->m_mfxVideoParam.mfx.FrameInfo.Width = AV_QSV_ALIGN16(avctx->width); ++ qsv_decode->m_mfxVideoParam.mfx.FrameInfo.Height = avctx->field_order > AV_FIELD_PROGRESSIVE ? AV_QSV_ALIGN32(avctx->height) : AV_QSV_ALIGN16(avctx->height); ++ qsv_decode->m_mfxVideoParam.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420; ++ } + AV_QSV_CHECK_RESULT(sts, MFX_ERR_NONE, sts); + + qsv_decode->bs.DataLength -= sizeof(ff_slice_code); -- cgit v1.2.3