/*****************************************************************************
* input_info.c: Convenient functions to handle the input info structures
*****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_info.c,v 1.10 2003/05/08 19:06:46 titer Exp $
+ * Copyright (C) 1998-2004 VideoLAN
+ * $Id: input_info.c,v 1.14 2004/01/25 17:16:06 zorglub Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#include "stream_control.h"
#include "input_ext-intf.h"
-#include "interface.h"
+#include "vlc_interface.h"
/**
* \brief Find info category by name.
p_category = malloc( sizeof( input_info_category_t ) );
if ( !p_category )
{
- msg_Err( p_input, "No mem" );
+ msg_Err( p_input, "out of memory" );
return NULL;
}
p_category->psz_name = strdup( psz_name );
p_category->p_next = NULL;
p_category->p_info = NULL;
- p_prev->p_next = p_category;
+ if( p_prev ) p_prev->p_next = p_category;
return p_category;
}
}
{
return -1;
}
-
+
va_start( args, psz_format );
-
+
/*
* Convert message to string
*/
* \internal
*
* \param p_input The input thread to be cleaned for info
- * \returns for the moment 0
+ * \returns for the moment VLC_SUCCESS
*/
int input_DelInfo( input_thread_t * p_input )
{
input_info_category_t * p_category, * p_prev_category;
input_info_t * p_info, * p_prev_info;
-
+
p_category = p_input->stream.p_info;
while ( p_category )
{
p_category = p_category->p_next;
free( p_prev_category );
}
- return 0;
+ return VLC_SUCCESS;
}