summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);