X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fstream_out%2Fswitcher.c;h=30d690242bdcf2230aea14ebf9f16aef869ea174;hb=918a6962f2223294a8818ef2c58fcc6d6f367528;hp=63aca6f81cb87322c275d309c28f32d42618daef;hpb=152b1687c0ec112f3ab1360006d048d6b9cf7258;p=vlc diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c index 63aca6f81c..30d690242b 100644 --- a/modules/stream_out/switcher.c +++ b/modules/stream_out/switcher.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -265,7 +266,7 @@ static int Open( vlc_object_t *p_this ) } var_Get( p_stream, SOUT_CFG_PREFIX "port", &val ); - p_sys->i_fd = net_ListenUDP1( p_stream, NULL, val.i_int ); + p_sys->i_fd = net_ListenUDP1( VLC_OBJECT(p_stream), NULL, val.i_int ); if ( p_sys->i_fd < 0 ) { free( p_sys ); @@ -387,13 +388,13 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) vlc_avcodec_lock(); if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) { - avcodec_unlock(); + vlc_avcodec_unlock(); msg_Err( p_stream, "cannot open encoder" ); av_free( id->ff_enc_c ); free( id ); return NULL; } - avcodec_unlock(); + vlc_avcodec_unlock(); id->p_buffer_out = malloc( AVCODEC_MAX_AUDIO_FRAME_SIZE * 2 ); id->p_samples = calloc( id->ff_enc_c->frame_size * p_fmt->audio.i_channels, @@ -798,14 +799,14 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) id->ff_enc_c->mb_decision = FF_MB_DECISION_SIMPLE; id->ff_enc_c->pix_fmt = PIX_FMT_YUV420P; - avcodec_lock(); + vlc_avcodec_lock(); if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) { - avcodec_unlock(); + vlc_avcodec_unlock(); msg_Err( p_stream, "cannot open encoder" ); return 0; } - avcodec_unlock(); + vlc_avcodec_unlock(); id->p_buffer_out = malloc( id->ff_enc_c->width * id->ff_enc_c->height * 3 ); id->p_frame = avcodec_alloc_frame();