changeset 36473:45f770df48de

XvMC: Minor refoactoring of allocate_xvimage().
author iive
date Mon, 06 Jan 2014 19:55:26 +0000
parents c431f2e17a19
children fdfc5ce7cf2a
files libvo/vo_xvmc.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xvmc.c	Thu Jan 02 09:16:57 2014 +0000
+++ b/libvo/vo_xvmc.c	Mon Jan 06 19:55:26 2014 +0000
@@ -184,8 +184,8 @@
 static void allocate_xvimage(int xvimage_width,int xvimage_height,int xv_format)
 {
  /*
-  * allocate XvImages.  FIXME: no error checking, without
-  * mit-shm this will bomb... trzing to fix ::atmos
+  * allocate XvImages.
+  * FIXME: no error checking
   */
 #ifdef HAVE_SHM
     if ( mLocalDisplay && XShmQueryExtension( mDisplay ) ) Shmem_Flag = 1;
@@ -207,14 +207,12 @@
         XShmAttach(mDisplay, &Shminfo);
         XSync(mDisplay, False);
         shmctl(Shminfo.shmid, IPC_RMID, 0);
+        return;
     }
-    else
 #endif
-    {
-        xvimage = (XvImage *) XvCreateImage(mDisplay, xv_port, xv_format, NULL, xvimage_width, xvimage_height);
-        xvimage->data = malloc(xvimage->data_size);
-        XSync(mDisplay,False);
-    }
+    xvimage = (XvImage *) XvCreateImage(mDisplay, xv_port, xv_format, NULL, xvimage_width, xvimage_height);
+    xvimage->data = malloc(xvimage->data_size);
+    XSync(mDisplay,False);
 // memset(xvimage->data,128,xvimage->data_size);
     return;
 }