X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Fvcd%2Finput_vcd.c;h=fa850ba7c5e2aa6af189645016d34ff2c870ea00;hb=d4f18c4eadb23de73e7ae1d1e2e899cbbfbef567;hp=acc3c919cd6a0da9fc571bff17f19244a3fab2b5;hpb=d865ef30309f7eedbbb89ce05e74b27b1051134e;p=vlc diff --git a/plugins/vcd/input_vcd.c b/plugins/vcd/input_vcd.c index acc3c919cd..fa850ba7c5 100644 --- a/plugins/vcd/input_vcd.c +++ b/plugins/vcd/input_vcd.c @@ -34,13 +34,10 @@ #include #include +#include #include #include -#ifdef STRNCASECMP_IN_STRINGS_H -# include -#endif - #if defined( WIN32 ) # include /* read() */ #else @@ -167,7 +164,7 @@ static int VCDOpen( struct input_thread_s *p_input ) free( psz_orig ); return -1; } - psz_source = config_GetPszVariable( INPUT_VCD_DEVICE_VAR ); + psz_source = config_GetPszVariable( "vcd_device" ); } /* test the type of file given */ @@ -294,7 +291,6 @@ static void VCDClose( struct input_thread_s *p_input ) { thread_vcd_data_t *p_vcd = (thread_vcd_data_t *)p_input->p_access_data; - input_BuffersEnd( p_input->p_method_data ); close( p_vcd->i_handle ); free( p_vcd ); } @@ -458,6 +454,11 @@ static int VCDInit( input_thread_t * p_input ) { es_descriptor_t * p_es; + if( p_input->stream.i_method != INPUT_METHOD_VCD ) + { + return -1; + } + vlc_mutex_lock( &p_input->stream.stream_lock ); /* Set program information. */