[vlc-commits] vdpau/chroma: avoid cascading errors when mixer creation fails

Rémi Denis-Courmont git at videolan.org
Sat Jun 7 18:28:01 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun  7 16:54:26 2014 +0300| [05e98ecfb3ce49e7d529978a96b50b35e4fb4410] | committer: Rémi Denis-Courmont

vdpau/chroma: avoid cascading errors when mixer creation fails

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05e98ecfb3ce49e7d529978a96b50b35e4fb4410
---

 modules/hw/vdpau/chroma.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index acd9fce..9474795 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -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:



More information about the vlc-commits mailing list