****************************************************************************/
static void EsOutAddInfo( es_out_t *out, es_out_id_t *es )
{
- es_out_sys_t *p_sys = out->p_sys;
- input_thread_t *p_input = p_sys->p_input;
- es_format_t *fmt = &es->fmt;
-
- char psz_cat[strlen(_("Stream %d")) + 12];
+ es_out_sys_t *p_sys = out->p_sys;
+ input_thread_t *p_input = p_sys->p_input;
+ es_format_t *fmt = &es->fmt;
+ char *psz_cat;
/* Add stream info */
- sprintf( psz_cat, _("Stream %d"), out->p_sys->i_id - 1 );
+ asprintf( &psz_cat, _("Stream %d"), out->p_sys->i_id - 1 );
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),
"%.4s", (char*)&fmt->i_codec );
default:
break;
}
+
+ free( psz_cat );
}
break; // success
socket_error:
- close( fd );
+ net_Close( fd );
fd = -1;
}
}
#if defined( UNDER_CE ) || defined( _MSC_VER )
+#ifdef UNDER_CE
MultiByteToWideChar( CP_ACP, 0, psz_dir, -1, psz_wdir, MAX_PATH );
rc = GetFileAttributes( psz_wdir );
- if( !(rc & FILE_ATTRIBUTE_DIRECTORY) )
- {
- /* Not a directory */
- return;
- }
+ if( !(rc & FILE_ATTRIBUTE_DIRECTORY) ) return; /* Not a directory */
/* Parse all files in the directory */
-#ifdef UNDER_CE
swprintf( psz_path, L"%s\\*.*", psz_dir );
+
#else
+ rc = GetFileAttributes( psz_dir );
+ if( !(rc & FILE_ATTRIBUTE_DIRECTORY) ) return; /* Not a directory */
+
+ /* Parse all files in the directory */
sprintf( psz_path, "%s\\*.*", psz_dir );
#endif
+
handle = FindFirstFile( psz_path, &finddata );
if( handle == INVALID_HANDLE_VALUE )
{
#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#elif defined( WIN32 ) && !defined( UNDER_CE )
+# include <io.h>
#endif
#include "network.h"
}
else
{
- if( fd == STDIN_FILENO ) i_recv = read( fd, p_data, i_data ); else
-
+ if( fd == 0 /*STDIN_FILENO*/ ) i_recv = read( fd, p_data, i_data ); else
if( ( i_recv = recv( fd, p_data, i_data, 0 ) ) <= 0 )
{
#ifdef WIN32
var_Get( p_input, "video-es", &val );
if( val.i_int >= 0 )
{
+ vlc_value_t val_es;
+ val_es.i_int = -VIDEO_ES;
p_vout->b_filter_change = VLC_TRUE;
- var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES );
+ var_Set( p_input, "video-es", val_es );
var_Set( p_input, "video-es", val );
}
var_Get( p_input, "video-es", &val );
if( val.i_int >= 0 )
{
+ vlc_value_t val_es;
+ val_es.i_int = -VIDEO_ES;
p_vout->b_filter_change = VLC_TRUE;
- var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES );
+ var_Set( p_input, "video-es", val_es );
var_Set( p_input, "video-es", val );
}