]> git.sesse.net Git - vlc/blobdiff - modules/demux/ty.c
Fix compiler warning about asprintf return value.
[vlc] / modules / demux / ty.c
index e49c56154228664f18a47f812e0954388740ae8d..98d48ca831faf6188a136a6cb9e1f94c614c102f 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_demux.h>
 #include "vlc_codec.h"
 #include "vlc_meta.h"
 #include "vlc_input.h"
 #include "../codec/cc.h"
 
+#include <assert.h>
+
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -53,11 +56,11 @@ static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
 vlc_module_begin();
-    set_shortname( _("TY") );
-    set_description(_("TY Stream audio/video demux"));
+    set_shortname( N_("TY") );
+    set_description(N_("TY Stream audio/video demux"));
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_DEMUX );
-    set_capability("demux2", 6);
+    set_capability("demux", 6);
     /* FIXME: there seems to be a segfault when using PVR access
      * and TY demux has a bigger priority than PS
      * Something must be wrong.
@@ -306,8 +309,8 @@ static int Open(vlc_object_t *p_this)
          U32_AT(&p_peek[8]) != CHUNK_SIZE )
     {
         if( !p_demux->b_force &&
-            !demux2_IsPathExtension( p_demux, ".ty" ) &&
-            !demux2_IsPathExtension( p_demux, ".ty+" ) )
+            !demux_IsPathExtension( p_demux, ".ty" ) &&
+            !demux_IsPathExtension( p_demux, ".ty+" ) )
             return VLC_EGENERIC;
         msg_Warn( p_demux, "this does not look like a TY file, "
                            "continuing anyway..." );
@@ -690,7 +693,7 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
                 //subrec_type, esOffset1);
             p_sys->lastVideoPTS = get_pts(
                     &p_block_in->p_buffer[ esOffset1 + VIDEO_PTS_OFFSET ] );
-            /*msg_Dbg(p_demux, "Video rec %d PTS "I64Fd, p_sys->i_cur_rec,
+            /*msg_Dbg(p_demux, "Video rec %d PTS %"PRId64, p_sys->i_cur_rec,
                         p_sys->lastVideoPTS );*/
             if (subrec_type != 0x06) {
                 /* if we found a PES, and it's not type 6, then we're S2 */
@@ -1087,7 +1090,7 @@ static int ty_stream_seek_pct(demux_t *p_demux, double seek_pct)
     /* seek within the chunk to get roughly to where we want */
     p_sys->i_cur_rec = (int)
       ((double) ((seek_pos % CHUNK_SIZE) / (double) (CHUNK_SIZE)) * p_sys->i_num_recs);
-    msg_Dbg(p_demux, "Seeked to file pos " I64Fd, seek_pos);
+    msg_Dbg(p_demux, "Seeked to file pos %"PRId64, seek_pos);
     msg_Dbg(p_demux, " (chunk %d, record %d)",
              p_sys->i_cur_chunk - 1, p_sys->i_cur_rec);