]> git.sesse.net Git - vlc/commitdiff
vdpau/chroma: avoid cascading errors when mixer creation fails
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 7 Jun 2014 13:54:26 +0000 (16:54 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 7 Jun 2014 16:10:58 +0000 (19:10 +0300)
modules/hw/vdpau/chroma.c

index acd9fcecf5db792c511fc739abdb860701bebcd5..94747955af75208720feeb1fc0bb46554f8bfd98 100644 (file)
@@ -197,9 +197,11 @@ static VdpVideoMixer MixerCreate(filter_t *filter)
     {
         msg_Err(filter, "video %s %s failure: %s", "mixer", "creation",
                 vdp_get_error_string(sys->vdp, err));
-        mixer = VDP_INVALID_HANDLE;
+        return VDP_INVALID_HANDLE;
     }
 
+    msg_Dbg(filter, "using video mixer %"PRIu32, mixer);
+
     /* Set initial features and attributes */
     VdpVideoMixerAttribute attrv[3];
     const void *valv[3];
@@ -305,7 +307,6 @@ static picture_t *OutputAllocate(filter_t *filter)
         sys->mixer = MixerCreate(filter);
         if (sys->mixer == VDP_INVALID_HANDLE)
             goto error;
-        msg_Dbg(filter, "using video mixer %"PRIu32, sys->mixer);
     }
     return pic;
 error: