X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fffmpeg%2Fmux.c;h=616ff0d0ba3e0f77b9b67512cb81240a5cca98a2;hb=6f7b6bf6fd00917d97fb297db4c9f53bd44fe2bb;hp=9350d26549dc0d6cb139ab297641cbdacaf3728c;hpb=8bc3f3eadb1582a1010ae0376c4160a4b5c9c512;p=vlc diff --git a/modules/codec/ffmpeg/mux.c b/modules/codec/ffmpeg/mux.c index 9350d26549..616ff0d0ba 100644 --- a/modules/codec/ffmpeg/mux.c +++ b/modules/codec/ffmpeg/mux.c @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* malloc(), free() */ #include #include @@ -166,7 +165,7 @@ void E_(CloseMux)( vlc_object_t *p_this ) { sout_mux_t *p_mux = (sout_mux_t*)p_this; sout_mux_sys_t *p_sys = p_mux->p_sys; - int i; + unsigned int i; if( av_write_trailer( p_sys->oc ) < 0 ) { @@ -261,7 +260,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) } #else # warning "WARNING!!!!!!!" -# warning "Using libavformat muxing with versions older than 51.8.0 (r7593) might produce broken files. +# warning "Using libavformat muxing with versions older than 51.8.0 (r7593) might produce broken files." /* This is a hack */ if( i_codec_id == CODEC_ID_MP2 ) i_codec_id = CODEC_ID_MP3; @@ -306,9 +305,9 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts ) /* We don't really need to have anything in the SPU fifo */ if( p_mux->pp_inputs[i]->p_fmt->i_cat == SPU_ES && - p_fifo->i_depth == 0 ) continue; + block_FifoCount( p_fifo ) == 0 ) continue; - if( p_fifo->i_depth ) + if( block_FifoCount( p_fifo ) ) { block_t *p_buf; @@ -428,6 +427,12 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args ) return VLC_SUCCESS; case MUX_GET_MIME: + { + char **ppsz = (char**)va_arg( args, char ** ); + *ppsz = strdup( p_mux->p_sys->oc->oformat->mime_type ); + return VLC_SUCCESS; + } + default: return VLC_EGENERIC; }