X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fpvr.c;h=ab80c7f5cedb873a7fab9db917e984bd3553bf4e;hb=63c7e4a5f5c7613a37e34d2e5451db2653e199b0;hp=f8c2ad69ba5c5d9436c33b3f1c19c87556b2bebc;hpb=95da3a666c28bebd06b17cd4985b81bac1015745;p=vlc diff --git a/modules/access/pvr.c b/modules/access/pvr.c index f8c2ad69ba..ab80c7f5ce 100644 --- a/modules/access/pvr.c +++ b/modules/access/pvr.c @@ -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;