/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include <vlc_demux.h>
#include "playlist.h"
/*****************************************************************************
* Import_IFO: main import function
*****************************************************************************/
-int E_(Import_IFO)( vlc_object_t *p_this )
+int Import_IFO( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
&& !strcasecmp( psz_file + strlen( "VTS_00_0" ) , ".IFO" ) ) ) )
{
int i_peek;
- byte_t *p_peek;
+ const uint8_t *p_peek;
i_peek = stream_Peek( p_demux->s, &p_peek, 8 );
- if( strncmp( p_peek, "DVDVIDEO", 8 ) )
+ if( i_peek != 8 || memcmp( p_peek, "DVDVIDEO", 8 ) )
return VLC_EGENERIC;
}
else
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
-void E_(Close_IFO)( vlc_object_t *p_this )
+void Close_IFO( vlc_object_t *p_this )
{
+ VLC_UNUSED(p_this);
}
static int Demux( demux_t *p_demux )
psz_url = (char *)malloc( len+1 );
snprintf( psz_url, len+1, "dvd://%s", p_demux->psz_path );
- p_input = input_ItemNewExt( p_playlist, psz_url, psz_url, 0, NULL, -1 );
+ p_input = input_ItemNewExt( p_demux, psz_url, psz_url, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
+ vlc_gc_decref( p_input );
HANDLE_PLAY_AND_RELEASE;
- return -1; /* Needed for correct operation of go back */
+ return 0; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
{
+ VLC_UNUSED(p_demux); VLC_UNUSED(i_query); VLC_UNUSED(args);
return VLC_EGENERIC;
}