]> git.sesse.net Git - vlc/blobdiff - modules/codec/ffmpeg/mux.c
Make PIX_FMT_RGBA dependend on ffmpeg with swscale. Patch by Remi Duraffort <ivoire...
[vlc] / modules / codec / ffmpeg / mux.c
index 9350d26549dc0d6cb139ab297641cbdacaf3728c..616ff0d0ba3e0f77b9b67512cb81240a5cca98a2 100644 (file)
@@ -24,7 +24,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
 
 #include <vlc/vlc.h>
 #include <vlc_block.h>
@@ -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;
     }