X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fdc1394.c;h=8ab82de5d318d8495f86b723c74c23d3f75013da;hb=f93eb575366f57526e7e010b99b3d23ab7262708;hp=111bbbbb25d461baa6bd6a0351dd809f39de1cf4;hpb=c4fc052b1e12d5f0fed5026dbefc65643c080268;p=vlc diff --git a/modules/access/dc1394.c b/modules/access/dc1394.c index 111bbbbb25..8ab82de5d3 100644 --- a/modules/access/dc1394.c +++ b/modules/access/dc1394.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #ifdef HAVE_FCNTL_H @@ -156,7 +156,7 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux ) } if( !found ) { - msg_Err( p_demux, "Can't find camera with uid : 0x%llx.", + msg_Err( p_demux, "Can't find camera with uid : 0x%"PRIx64".", sys->selected_uid ); goto end; } @@ -232,7 +232,7 @@ static int Open( vlc_object_t *p_this ) { msg_Err( p_demux, "Bad MRL, please check the option line " "(MRL was: %s)", - p_demux->psz_path ); + p_demux->psz_location ); free( p_sys ); return VLC_EGENERIC; } @@ -382,8 +382,7 @@ static int Open( vlc_object_t *p_this ) i_height = p_sys->height; if( picture_Setup( &p_sys->pic, VLC_CODEC_UYVY, - i_width, i_height, - i_width * VOUT_ASPECT_FACTOR / i_height ) ) + i_width, i_height, 1, 1 ) ) { msg_Err( p_demux ,"unknown chroma" ); Close( p_this ); @@ -443,7 +442,7 @@ static int OpenAudioDev( demux_t *p_demux ) int i_format = AFMT_S16_LE; int result; - p_sys->fd_audio = utf8_open( psz_device, O_RDONLY | O_NONBLOCK ); + p_sys->fd_audio = vlc_open( psz_device, O_RDONLY | O_NONBLOCK ); if( p_sys->fd_audio < 0 ) { msg_Err( p_demux, "Cannot open audio device (%s)", psz_device ); @@ -521,6 +520,7 @@ static void Close( vlc_object_t *p_this ) dc1394_camera_free(p_sys->camera); dc1394_free(p_sys->p_dccontext); + free( p_sys->video_device ); free( p_sys->audio_device ); free( p_sys ); } @@ -715,7 +715,7 @@ static int process_options( demux_t *p_demux ) const char *in_fmt = NULL; float rate_f; - psz_dup = strdup( p_demux->psz_path ); + psz_dup = strdup( p_demux->psz_location ); psz_parser = psz_dup; for( token = strtok_r( psz_parser,":",&state); token; token = strtok_r( NULL, ":", &state ) ) @@ -930,7 +930,7 @@ static int process_options( demux_t *p_demux ) else if( strncmp( token, "uid=", strlen("uid=") ) == 0) { token += strlen("uid="); - sscanf( token, "0x%llx", &p_sys->selected_uid ); + sscanf( token, "0x%"SCNx64, &p_sys->selected_uid ); } } @@ -969,5 +969,7 @@ static int process_options( demux_t *p_demux ) else // YUV422 default p_sys->video_mode = DC1394_VIDEO_MODE_640x480_YUV422; } + + free( psz_dup ); return VLC_SUCCESS; }