]> git.sesse.net Git - vlc/blobdiff - modules/mux/mpeg/ts.c
Use the new block_Fifo functions
[vlc] / modules / mux / mpeg / ts.c
index 6ab9275874426fb7c57609b2f3c6febb2dc8d2ce..eb4a642be8c469bf95451daade7b06675bfbab32 100644 (file)
@@ -27,7 +27,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
 
 #include <vlc/vlc.h>
 #include <vlc_sout.h>
@@ -157,10 +156,9 @@ static void    Close  ( vlc_object_t * );
   "16 char string (8 hexadecimal bytes).")
 
 #define CPKT_TEXT N_("Packet size in bytes to encrypt")
-/// \bug [String] Extra space
 #define CPKT_LONGTEXT N_("Size of the TS packet to encrypt. " \
     "The encryption routines subtract the TS-header from the value before " \
-    "encrypting. " )
+    "encrypting." )
 
 #define SOUT_CFG_PREFIX "sout-ts-"
 #ifdef HAVE_BSEARCH
@@ -1055,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 );
@@ -1073,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] );
@@ -1344,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 )
@@ -1352,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;
@@ -1390,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 );
@@ -1485,7 +1483,7 @@ static int Mux( sout_mux_t *p_mux )
                             else if( p_input->p_fmt->i_codec ==
                                        VLC_FOURCC('d','v','b','s') )
                             {
-                                /* EN 300 473 */
+                                /* EN 300 743 */
                                 b_data_alignment = 1;
                             }
                         }