diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-04-01 18:53:27 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-04-01 18:53:27 +0200 |
commit | d91e7aac122fef557afe9695ea2c9780ecc742ca (patch) | |
tree | 11426bd9678f3644e2a965dbbed6d609c24a123a | |
parent | 358d4524cc8fda2660679d8080cfe937b41c73c3 (diff) | |
parent | 0d3176e32f351d18d6174d8b05796829a75a4c6b (diff) | |
download | ffmpeg-d91e7aac122fef557afe9695ea2c9780ecc742ca.tar.gz |
Merge commit '0d3176e32f351d18d6174d8b05796829a75a4c6b'
* commit '0d3176e32f351d18d6174d8b05796829a75a4c6b':
hwcontext_dxva2: do not assume the destination format during mapping is always the right one
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavutil/hwcontext_dxva2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index c5265b9925..52941060a6 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -361,6 +361,10 @@ static int dxva2_map_from(AVHWFramesContext *ctx, { int err; + if (dst->format != AV_PIX_FMT_NONE && dst->format != ctx->sw_format) + return AVERROR(ENOSYS); + dst->format = ctx->sw_format; + err = dxva2_map_frame(ctx, dst, src, flags); if (err < 0) return err; |