vdpau: implement VideoMixerDestroy
authorChristian König <deathsimple@vodafone.de>
Tue, 26 Apr 2011 09:16:54 +0000 (11:16 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 26 Apr 2011 09:16:54 +0000 (11:16 +0200)
src/gallium/state_trackers/vdpau/mixer.c

index bafd84f4c511846789f377e34a44647732a63ac7..b02d591eb0560d0dcdf45dca26d1d33181332237 100644 (file)
@@ -89,7 +89,19 @@ no_handle:
 VdpStatus
 vlVdpVideoMixerDestroy(VdpVideoMixer mixer)
 {
-   return VDP_STATUS_NO_IMPLEMENTATION;
+   vlVdpVideoMixer *vmixer;
+
+   debug_printf("[VDPAU] Destroying VideoMixer\n");
+
+   vmixer = vlGetDataHTAB(mixer);
+   if (!vmixer)
+      return VDP_STATUS_INVALID_HANDLE;
+
+   vmixer->compositor->destroy(vmixer->compositor);
+
+   FREE(vmixer);
+
+   return VDP_STATUS_OK;
 }
 
 VdpStatus