]> git.sesse.net Git - vlc/blobdiff - modules/codec/tarkin.c
Remove silly use of vlc_object_find
[vlc] / modules / codec / tarkin.c
index 3436fa7312fa622972956cc04605e82c448ee943..2a35e496f3c2374315729c50df90efd9080c9b22 100644 (file)
@@ -28,7 +28,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_codec.h>
 #include <vlc_vout.h>
 #include <ogg/ogg.h>
@@ -75,14 +76,14 @@ static void tarkin_CopyPicture( decoder_t *, picture_t *, uint8_t *, int );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_description( _("Tarkin decoder module") );
-    set_capability( "decoder", 100 );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_VCODEC );
-    set_callbacks( OpenDecoder, CloseDecoder );
-    add_shortcut( "tarkin" );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("Tarkin decoder module") )
+    set_capability( "decoder", 100 )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_VCODEC )
+    set_callbacks( OpenDecoder, CloseDecoder )
+    add_shortcut( "tarkin" )
+vlc_module_end ()
 
 /*****************************************************************************
  * OpenDecoder: probe the decoder and return score
@@ -100,10 +101,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys =
           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
@@ -268,7 +266,7 @@ static picture_t *DecodePacket( decoder_t *p_dec, block_t **pp_block,
         p_dec->fmt_out.i_codec = i_chroma;
 
         /* Get a new picture */
-        if( (p_pic = p_dec->pf_vout_buffer_new( p_dec )) )
+        if( (p_pic = decoder_NewPicture( p_dec )) )
         {
             tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride );