vdpau: have av_vdpau_bind_context() fail on unsupported flag

Currently, no flags are supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Rémi Denis-Courmont 2014-10-14 12:59:53 +03:00 committed by Anton Khirnov
parent e09a947c1a
commit c1724623ce
1 changed files with 3 additions and 0 deletions

View File

@ -313,6 +313,9 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
{
VDPAUHWContext *hwctx;
if (flags != 0)
return AVERROR(EINVAL);
if (av_reallocp(&avctx->hwaccel_context, sizeof(*hwctx)))
return AVERROR(ENOMEM);