# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_vout.h>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-vlc_module_begin();
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_VCODEC );
- set_shortname( _("SDL Image decoder"));
- set_description( _("SDL_image video decoder") );
- set_capability( "decoder", 60 );
- set_callbacks( OpenDecoder, CloseDecoder );
- add_shortcut( "sdl_image" );
-vlc_module_end();
+vlc_module_begin ()
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_VCODEC )
+ set_shortname( N_("SDL Image decoder"))
+ set_description( N_("SDL_image video decoder") )
+ set_capability( "decoder", 60 )
+ set_callbacks( OpenDecoder, CloseDecoder )
+ add_shortcut( "sdl_image" )
+vlc_module_end ()
static const struct supported_fmt_t
{
if( pp_block == NULL || *pp_block == NULL ) return NULL;
p_block = *pp_block;
+ if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
+ {
+ block_Release( p_block ); *pp_block = NULL;
+ return NULL;
+ }
+
p_rw = SDL_RWFromConstMem( p_block->p_buffer, p_block->i_buffer );
/* Decode picture. */
/ p_surface->h;
/* Get a new picture. */
- p_pic = p_dec->pf_vout_buffer_new( p_dec );
+ p_pic = decoder_NewPicture( p_dec );
if ( p_pic == NULL ) goto error;
switch ( p_surface->format->BitsPerPixel )
}
}
+ p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts;
+
SDL_FreeSurface( p_surface );
block_Release( p_block ); *pp_block = NULL;
return p_pic;