]> git.sesse.net Git - vlc/blobdiff - modules/demux/ts.c
Convert the new libvlc API (so, the one that is in src/control) not to use the old...
[vlc] / modules / demux / ts.c
index 5d3a43acf4496f38663669987d04b845b8d137b9..376c1e102423a3feb568ddc9fbe19c3c026ebdca 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * ts.c: Transport Stream input module for VLC.
  *****************************************************************************
- * Copyright (C) 2004-2005 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2004-2005 the VideoLAN team
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+
+#include <vlc/vlc.h>
+
+#include <stdio.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <ctype.h>
 
-#include <vlc/vlc.h>
 #include <vlc/input.h>
 
 #include "iso_lang.h"
@@ -973,7 +976,7 @@ static int DemuxFile( demux_t *p_demux )
         i_diff = ( i_cc - p_pid->i_cc )&0x0f;
         if( b_payload && i_diff == 1 )
         {
-            p_pid->i_cc++;
+            p_pid->i_cc = ( p_pid->i_cc + 1 ) & 0xf;
         }
         else
         {
@@ -1782,7 +1785,7 @@ static vlc_bool_t GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
     i_diff = ( i_cc - pid->i_cc )&0x0f;
     if( b_payload && i_diff == 1 )
     {
-        pid->i_cc++;
+        pid->i_cc = ( pid->i_cc + 1 ) & 0xf;
     }
     else
     {
@@ -2403,6 +2406,7 @@ static void SDTCallBack( demux_t *p_demux, dvbpsi_sdt_t *p_sdt )
         {
             if( p_dr->i_tag == 0x48 )
             {
+#if 0
                 static const char *psz_type[0x11] = {
                     "Reserved",
                     "Digital television service",
@@ -2422,6 +2426,7 @@ static void SDTCallBack( demux_t *p_demux, dvbpsi_sdt_t *p_sdt )
                     "RCS FLS (see EN 301 790 [35])",
                     "DVB MHP service"
                 };
+#endif
                 dvbpsi_service_dr_t *pD = dvbpsi_DecodeServiceDr( p_dr );
                 char str1[257];
                 char str2[257];