[FFmpeg-cvslog] libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored
Ivan Uskov
git at videolan.org
Wed Aug 19 14:30:23 CEST 2015
ffmpeg | branch: master | Ivan Uskov <ivan.uskov at nablet.com> | Thu Aug 6 09:14:59 2015 -0400| [fffae8e605c8a665eac0ae63c3c84f60efbec73e] | committer: Michael Niedermayer
libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored
Reviewed-by: Hendrik Leppkes <h.leppkes at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fffae8e605c8a665eac0ae63c3c84f60efbec73e
---
libavcodec/qsvdec.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index e3c076d..1062ef0 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -54,6 +54,9 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt)
mfxVideoParam param = { { 0 } };
mfxBitstream bs = { { { 0 } } };
int ret;
+ enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_NONE };
q->iopattern = MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
if (!q->session) {
@@ -120,7 +123,11 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt)
return ff_qsv_error(ret);
}
- avctx->pix_fmt = AV_PIX_FMT_NV12;
+ ret = ff_get_format(avctx, pix_fmts);
+ if (ret < 0)
+ return ret;
+
+ avctx->pix_fmt = ret;
avctx->profile = param.mfx.CodecProfile;
avctx->level = param.mfx.CodecLevel;
avctx->coded_width = param.mfx.FrameInfo.Width;
More information about the ffmpeg-cvslog
mailing list