projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adb0e94
)
hwcontext_dxva2: do not assume the destination format during mapping is always the...
author
Anton Khirnov
<anton@khirnov.net>
Mon, 7 Nov 2016 12:34:21 +0000
(13:34 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 18 Nov 2016 09:31:53 +0000
(10:31 +0100)
Handle the cases where it is unsupported or unset.
libavutil/hwcontext_dxva2.c
patch
|
blob
|
blame
|
history
diff --git
a/libavutil/hwcontext_dxva2.c
b/libavutil/hwcontext_dxva2.c
index
600cf0e
..
8a05071
100644
(file)
--- 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;