summaryrefslogtreecommitdiff
path: root/avconv_qsv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-13 09:16:35 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-22 19:08:12 +0200
commit8b7a9729aa162e2bbd571933f1aa40767f1ff47b (patch)
treec58efed6150cb8ea248e7d718c02b834270eb24c /avconv_qsv.c
parent6f40181cad8ac04adff7bd10e1e1ab65f22bc1f0 (diff)
avconv_qsv: use the actual pixel format provided by lavc
Do not hardcode NV12. This allows 10bit decoding with -hwaccel qsv.
Diffstat (limited to 'avconv_qsv.c')
-rw-r--r--avconv_qsv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/avconv_qsv.c b/avconv_qsv.c
index 400cf22c87..723c6e0224 100644
--- a/avconv_qsv.c
+++ b/avconv_qsv.c
@@ -79,7 +79,7 @@ int qsv_init(AVCodecContext *s)
frames_ctx->width = FFALIGN(s->coded_width, 32);
frames_ctx->height = FFALIGN(s->coded_height, 32);
frames_ctx->format = AV_PIX_FMT_QSV;
- frames_ctx->sw_format = AV_PIX_FMT_NV12;
+ frames_ctx->sw_format = s->sw_pix_fmt;
frames_ctx->initial_pool_size = 32;
frames_hwctx->frame_type = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;