Browse Source

qsvdec: only access hwaccel_context is the pixel format is QSV

We do not strictly specify that hwaccel_context must be cleared if no
hwaccel is used.

Reported-By: wm4 <nfxjfg@googlemail.com>
tags/n3.3
Anton Khirnov 9 years ago
parent
commit
e328178da9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/qsvdec.c

+ 1
- 1
libavcodec/qsvdec.c View File

@@ -106,7 +106,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
return AVERROR(ENOMEM);
}

if (avctx->hwaccel_context) {
if (avctx->pix_fmt == AV_PIX_FMT_QSV && avctx->hwaccel_context) {
AVQSVContext *user_ctx = avctx->hwaccel_context;
session = user_ctx->session;
iopattern = user_ctx->iopattern;


Loading…
Cancel
Save