summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg
diff options
context:
space:
mode:
authormaxd <[email protected]>2013-10-08 13:33:21 +0000
committermaxd <[email protected]>2013-10-08 13:33:21 +0000
commitb2d1486ba0c2bd29e88e9ed8358cadd447c5cbee (patch)
tree5ba4699897b3a0d894a44cb178104d4306c6db78 /contrib/ffmpeg
parentc663cbbc45fbdeb48e81c12ab32b3642cb1e2b6a (diff)
QSV: added check for dimensions
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5824 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r--contrib/ffmpeg/A00-qsv.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/ffmpeg/A00-qsv.patch b/contrib/ffmpeg/A00-qsv.patch
index 565f098f7..de9c66c89 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..6f22b34
+index 0000000..a353c22
--- /dev/null
+++ b/libavcodec/qsv_h264.c
-@@ -0,0 +1,983 @@
+@@ -0,0 +1,984 @@
+/* ********************************************************************* *\
+
+Copyright (C) 2013 Intel Corporation. All rights reserved.
@@ -1418,11 +1418,12 @@ index 0000000..6f22b34
+
+ sts = MFXVideoDECODE_DecodeHeader(qsv->mfx_session, &qsv_decode->bs,
+ &qsv_decode->m_mfxVideoParam);
-+ if (sts <= MFX_ERR_NONE)
++ if (sts <= MFX_ERR_NONE && avctx->height && avctx->width)
+ {
+ av_log(avctx, AV_LOG_QUIET,"DecodeHeader failed with result:%d\n",sts);
+ sts = MFX_ERR_NONE;
+
++ // to cover absents of SPS details
+ 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);