#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_demux.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
#include <vlc_picture.h>
#ifdef HAVE_FCNTL_H
}
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;
}
{
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;
}
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 );
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 );
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 );
}
p_sys->i_audio_max_frame_size );
if( i_read <= 0 )
+ {
+ block_Release( p_block );
return NULL;
+ }
p_block->i_buffer = i_read;
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 ) )
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 );
}
}
else // YUV422 default
p_sys->video_mode = DC1394_VIDEO_MODE_640x480_YUV422;
}
+
+ free( psz_dup );
return VLC_SUCCESS;
}