]> git.sesse.net Git - vlc/commitdiff
fix compile faults and semantic errors in pvr module, mostly relating to the new api
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 11 Jun 2007 12:00:42 +0000 (12:00 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 11 Jun 2007 12:00:42 +0000 (12:00 +0000)
modules/access/pvr.c

index f8c2ad69ba5c5d9436c33b3f1c19c87556b2bebc..ab80c7f5cedb873a7fab9db917e984bd3553bf4e 100644 (file)
@@ -428,7 +428,7 @@ static int ConfigureV4L2( access_t * p_access )
     controls.controls    = calloc( sizeof( struct v4l2_ext_control ),
                                    MAX_V4L2_CTRLS );
 
-    if( controls.control == NULL )
+    if( controls.controls == NULL )
         return VLC_ENOMEM;
 
     /* Note: Ignore frame rate.  Doesn't look like it can be changed. */
@@ -524,7 +524,7 @@ static int ConfigureV4L2( access_t * p_access )
         msg_Err( p_access, "Failed to write %u new capture card settings.",
                             controls.error_idx );
     }
-    free( control.controls );
+    free( controls.controls );
     return VLC_SUCCESS;
 }
 
@@ -1018,9 +1018,9 @@ static int Open( vlc_object_t * p_this )
         {
 #ifdef HAVE_NEW_LINUX_VIDEODEV2_H
             result = ConfigureV4L2( p_access );
-            if( !result )
+            if( result != VLC_SUCCESS )
             {
-                Close( p_access );
+                Close( VLC_OBJECT(p_access) );
                 return result;
             }
 #else
@@ -1031,7 +1031,7 @@ static int Open( vlc_object_t * p_this )
         else
         {
             result = ConfigureIVTV( p_access );
-            if( !result )
+            if( result != VLC_SUCCESS )
             {
                 Close( VLC_OBJECT(p_access) );
                 return result;