]> git.sesse.net Git - vlc/blobdiff - modules/mux/mpeg/ts.c
Use the new block_Fifo functions
[vlc] / modules / mux / mpeg / ts.c
index d50b132505400eb51268566a33141c79ef860e6b..eb4a642be8c469bf95451daade7b06675bfbab32 100644 (file)
@@ -27,7 +27,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
 
 #include <vlc/vlc.h>
 #include <vlc_sout.h>
@@ -1054,7 +1053,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
         {
             char *psz = p_input->p_fmt->p_extra_languages[i-1].psz_language;
             const iso639_lang_t *pl = NULL;
-            
             if( strlen( psz ) == 2 )
             {
                 pl = GetLang_1( psz );
@@ -1072,7 +1071,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
                 p_stream->lang[i*3+0] = pl->psz_iso639_2T[0];
                 p_stream->lang[i*3+1] = pl->psz_iso639_2T[1];
                 p_stream->lang[i*3+2] = pl->psz_iso639_2T[2];
-                
                 msg_Dbg( p_mux, "    - lang=%c%c%c",
                          p_stream->lang[i*3+0], p_stream->lang[i*3+1],
                          p_stream->lang[i*3+2] );
@@ -1343,7 +1342,7 @@ static int Mux( sout_mux_t *p_mux )
                     p_pcr_stream->i_pes_dts + p_pcr_stream->i_pes_length )
                 {
                     /* Need more data */
-                    if( p_input->p_fifo->i_depth <= 1 )
+                    if( block_FifoCount( p_input->p_fifo ) <= 1 )
                     {
                         if( p_input->p_fmt->i_cat == AUDIO_ES ||
                             p_input->p_fmt->i_cat == VIDEO_ES )
@@ -1351,7 +1350,7 @@ static int Mux( sout_mux_t *p_mux )
                             /* We need more data */
                             return VLC_SUCCESS;
                         }
-                        else if( p_input->p_fifo->i_depth <= 0 )
+                        else if( block_FifoCount( p_input->p_fifo ) <= 0 )
                         {
                             /* spu, only one packet is needed */
                             continue;
@@ -1389,7 +1388,7 @@ static int Mux( sout_mux_t *p_mux )
                     else
                         p_data = FixPES( p_mux, p_input->p_fifo );
 
-                    if( p_input->p_fifo->i_depth > 0 &&
+                    if( block_FifoCount( p_input->p_fifo ) > 0 &&
                         p_input->p_fmt->i_cat != SPU_ES )
                     {
                         block_t *p_next = block_FifoShow( p_input->p_fifo );