[mythtv] [patch] XvMC Surface Check (trivial bug fix)

Daniel Thor Kristjansson danielk at cat.nyu.edu
Tue Aug 17 13:12:24 EDT 2004


This is just a reminder for the cvs committers. I sent this patch a
few weeks ago and it seems to have fallen through the cracks. It's a
trivial bugfix patch. It makes sure that we check the return value when
we create an XvMC surface.

-- Daniel
-------------- next part --------------
Index: libs/libmythtv/videoout_xvmc.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videoout_xvmc.cpp,v
retrieving revision 1.29
diff -u -r1.29 videoout_xvmc.cpp
--- libs/libmythtv/videoout_xvmc.cpp	20 May 2004 07:09:02 -0000	1.29
+++ libs/libmythtv/videoout_xvmc.cpp	6 Jul 2004 16:19:35 -0000
@@ -312,6 +312,11 @@
                 XvFreeAdaptorInfo(ai);
         }
     }
+    if (xv_port<=0)
+    {
+        cerr << "Invalid xv port " << xv_port << endl;
+	return false;
+    }
 
 #ifndef QWS
     GetMythTVGeometry(data->XJ_disp, XJ_screen_num,


More information about the mythtv-dev mailing list