summaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-04-01 18:53:40 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2017-04-01 18:53:40 +0200
commit5c612c5ff8c4adf33ede42ad63183c41334ea2d2 (patch)
treefec30e602b84b4276d11c58b5812d6f6568a92a8 /libavutil
parent0f9ce9c5fcdb4ae9f990835f6579c33f7619e904 (diff)
parente18ba2dfd2d19aedc8afccf011d5fd0833352423 (diff)
downloadffmpeg-streaming-5c612c5ff8c4adf33ede42ad63183c41334ea2d2.zip
ffmpeg-streaming-5c612c5ff8c4adf33ede42ad63183c41334ea2d2.tar.gz
Merge commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423'
* commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423': hwcontext_dxva2: make sure the sw frame format is the right one during transfer Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/hwcontext_dxva2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c
index 89fedd2..4ed0d56 100644
--- a/libavutil/hwcontext_dxva2.c
+++ b/libavutil/hwcontext_dxva2.c
@@ -331,6 +331,9 @@ static int dxva2_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
AVFrame *map;
int ret;
+ if (src->format != ctx->sw_format)
+ return AVERROR(ENOSYS);
+
map = av_frame_alloc();
if (!map)
return AVERROR(ENOMEM);
@@ -355,6 +358,9 @@ static int dxva2_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
ptrdiff_t src_linesize[4], dst_linesize[4];
int ret, i;
+ if (dst->format != ctx->sw_format)
+ return AVERROR(ENOSYS);
+
map = av_frame_alloc();
if (!map)
return AVERROR(ENOMEM);
OpenPOWER on IntegriCloud