vdpau: have av_vdpau_bind_context() fail on unsupported flag
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 14 Oct 2014 09:59:53 +0000 (12:59 +0300)
committerAnton Khirnov <anton@khirnov.net>
Wed, 15 Oct 2014 06:21:47 +0000 (06:21 +0000)
Currently, no flags are supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/vdpau.c

index 44eef20..9805a8d 100644 (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);