X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Faccess%2Fdc1394.c;h=0bf9a0eef49a6933edaffc98c104b2735e0f0321;hb=c22f2d8b0115d2d1c65eb2af66f2e50990985eff;hp=03ea72b64bd9176529839167ca1e6ce1f39fd31b;hpb=f6dd239c88e449b76f2b533c136bb8bbc133a9da;p=vlc diff --git a/modules/access/dc1394.c b/modules/access/dc1394.c index 03ea72b64b..0bf9a0eef4 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 @@ -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 ); } @@ -618,7 +618,10 @@ static block_t *GrabAudio( demux_t *p_demux ) p_sys->i_audio_max_frame_size ); if( i_read <= 0 ) + { + block_Release( p_block ); return NULL; + } p_block->i_buffer = i_read; @@ -927,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 ); } } @@ -966,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; }