]> git.sesse.net Git - vlc/blobdiff - modules/codec/svcdsub.c
codec/dirac: Rewrite libdirac(-research) encoding support
[vlc] / modules / codec / svcdsub.c
index c8572bdbd8cb605a650adba2e531a3838e968bc9..184311510b59b6588e0fb88e4d0b11fd0ab465ae 100644 (file)
@@ -51,22 +51,22 @@ static void DecoderClose  ( vlc_object_t * );
     "calls                 1\n" \
     "packet assembly info  2\n" )
 
-vlc_module_begin();
-    set_description( N_("Philips OGT (SVCD subtitle) decoder") );
-    set_shortname( N_("SVCD subtitles") );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_SCODEC );
-    set_capability( "decoder", 50 );
-    set_callbacks( DecoderOpen, DecoderClose );
+vlc_module_begin ()
+    set_description( N_("Philips OGT (SVCD subtitle) decoder") )
+    set_shortname( N_("SVCD subtitles") )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_SCODEC )
+    set_capability( "decoder", 50 )
+    set_callbacks( DecoderOpen, DecoderClose )
 
     add_integer ( MODULE_STRING "-debug", 0, NULL,
                   DEBUG_TEXT, DEBUG_LONGTEXT, true );
 
-    add_submodule();
-    set_description( N_("Philips OGT (SVCD subtitle) packetizer") );
-    set_capability( "packetizer", 50 );
-    set_callbacks( PacketizerOpen, DecoderClose );
-vlc_module_end();
+    add_submodule ()
+    set_description( N_("Philips OGT (SVCD subtitle) packetizer") )
+    set_capability( "packetizer", 50 )
+    set_callbacks( PacketizerOpen, DecoderClose )
+vlc_module_end ()
 
 /*****************************************************************************
  * Local prototypes
@@ -437,7 +437,7 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
     p_sys->i_image_length  = p_sys->i_spu_size - p_sys->i_image_offset;
     p_sys->metadata_length = p_sys->i_image_offset;
 
-  if (p_sys && p_sys->i_debug & DECODE_DBG_PACKET)
+  if( p_sys->i_debug & DECODE_DBG_PACKET )
   {
       msg_Dbg( p_dec, "x-start: %d, y-start: %d, width: %d, height %d, "
            "spu size: %zu, duration: %"PRIu64" (d:%zu p:%"PRIu16")",
@@ -445,7 +445,7 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
            p_sys->i_width, p_sys->i_height,
            p_sys->i_spu_size, p_sys->i_duration,
            p_sys->i_image_length, p_sys->i_image_offset);
+
       for( i = 0; i < 4; i++ )
       {
           msg_Dbg( p_dec, "palette[%d]= T: %2x, Y: %2x, u: %2x, v: %2x", i,
@@ -471,7 +471,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
     int i;
 
     /* Allocate the subpicture internal data. */
-    p_spu = p_dec->pf_spu_buffer_new( p_dec );
+    p_spu = decoder_NewSubpicture( p_dec );
     if( !p_spu ) return NULL;
 
     p_spu->i_start = p_data->i_pts;
@@ -509,7 +509,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
     if( !p_region )
     {
         msg_Err( p_dec, "cannot allocate SVCD subtitle region" );
-        p_dec->pf_spu_buffer_del( p_dec, p_spu );
+        decoder_DeleteSubpicture( p_dec, p_spu );
         return NULL;
     }