X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Ftarkin.c;h=8c00db57632a8e8c4dc8642f74e835134011bfea;hb=28d7e588fd23788834a4e89bed50962d24f8a04e;hp=80f7a9feb078dbdd94d81ce7350bc50b315e40e3;hpb=d3fe7f28797d4dba65ffcdd60bf932e758a48a9e;p=vlc diff --git a/modules/codec/tarkin.c b/modules/codec/tarkin.c index 80f7a9feb0..8c00db5763 100644 --- a/modules/codec/tarkin.c +++ b/modules/codec/tarkin.c @@ -24,7 +24,12 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include #include @@ -71,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") ) + 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 @@ -96,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; @@ -264,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 ); @@ -310,7 +312,7 @@ static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic, for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_src_stride ); + vlc_memcpy( p_dst, p_src, i_src_stride ); p_src += i_src_stride; p_dst += i_dst_stride;