# HG changeset patch # User iive # Date 1389038126 0 # Node ID 45f770df48dea87ddf68691d213627da370d9cad # Parent c431f2e17a1925c050edaf6086e40f3902d825d6 XvMC: Minor refoactoring of allocate_xvimage(). diff -r c431f2e17a19 -r 45f770df48de libvo/vo_xvmc.c --- 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; }