summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg
diff options
context:
space:
mode:
authormaxd <[email protected]>2013-10-05 22:24:07 +0000
committermaxd <[email protected]>2013-10-05 22:24:07 +0000
commitf0003ac97e447256432fcaa91c77559675a0d544 (patch)
tree183179c78ee133abdc79970bd66f64d820805169 /contrib/ffmpeg
parentac2f6f59343ee6166ebe5e6b709dfea6d549190b (diff)
QSV: fix for stream(s) with no-SPS available
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5821 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r--contrib/ffmpeg/A00-qsv.patch13
1 files changed, 11 insertions, 2 deletions
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);