ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Mon Nov 7 13:34:21 2016 +0100| [0d3176e32f351d18d6174d8b05796829a75a4c6b] | committer: Anton Khirnov
hwcontext_dxva2: do not assume the destination format during mapping is always the right one Handle the cases where it is unsupported or unset. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d3176e32f351d18d6174d8b05796829a75a4c6b --- libavutil/hwcontext_dxva2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index 600cf0e..8a05071 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -345,6 +345,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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog