]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg_vdpau.c
swscale: Deprecate vector functions which are unused outside swscale
[ffmpeg] / ffmpeg_vdpau.c
index 893fdcb1d9ad51eb013b90116aee0433a944259d..cf2e83e8a3f58cacae643cf316409227f9cd2cb3 100644 (file)
@@ -106,7 +106,6 @@ static int vdpau_alloc(AVCodecContext *s)
 {
     InputStream  *ist = s->opaque;
     int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
-    AVVDPAUContext *vdpau_ctx;
     VDPAUContext *ctx;
     const char *display, *vendor;
     VdpStatus err;
@@ -127,8 +126,10 @@ static int vdpau_alloc(AVCodecContext *s)
         return AVERROR(ENOMEM);
 
     device_priv = av_mallocz(sizeof(*device_priv));
-    if (!device_priv)
+    if (!device_priv) {
+        av_freep(&ctx);
         goto fail;
+    }
 
     ist->hwaccel_ctx           = ctx;
     ist->hwaccel_uninit        = vdpau_uninit;