X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fschroedinger.c;h=4bb392a6e6474e2ff7cb3a5e6fefaa2c4d3f1938;hb=940c79795a4b59431f74b0df96cbcc14fc1b1b91;hp=3fc1582b8a901c15a6f76bf71b2fc7012ee9c442;hpb=35824733e305214dfada18dd6362cfa02a86dcd3;p=vlc diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c index 3fc1582b8a..4bb392a6e6 100644 --- a/modules/codec/schroedinger.c +++ b/modules/codec/schroedinger.c @@ -45,14 +45,14 @@ static int OpenDecoder ( vlc_object_t * ); static void CloseDecoder ( vlc_object_t * ); -vlc_module_begin(); - set_category( CAT_INPUT ); - set_subcategory( SUBCAT_INPUT_VCODEC ); - set_description( N_("Schroedinger video decoder") ); - set_capability( "decoder", 200 ); - set_callbacks( OpenDecoder, CloseDecoder ); - add_shortcut( "schroedinger" ); -vlc_module_end(); +vlc_module_begin () + set_category( CAT_INPUT ) + set_subcategory( SUBCAT_INPUT_VCODEC ) + set_description( N_("Schroedinger video decoder") ) + set_capability( "decoder", 200 ) + set_callbacks( OpenDecoder, CloseDecoder ) + add_shortcut( "schroedinger" ) +vlc_module_end () /***************************************************************************** * Local prototypes @@ -206,16 +206,14 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos ) { decoder_sys_t *p_sys = p_dec->p_sys; uint32_t u_pnum; - mtime_t i_pts; u_pnum = GetDWBE( p_block->p_buffer + i_pupos + 13 ); - i_pts = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts; for( int i=0; ipts_tlb[i].i_empty ) { p_sys->pts_tlb[i].u_pnum = u_pnum; - p_sys->pts_tlb[i].i_pts = i_pts; + p_sys->pts_tlb[i].i_pts = p_block->i_pts; p_sys->pts_tlb[i].i_empty = 0; return; @@ -223,7 +221,7 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos ) } msg_Err( p_dec, "Could not store PTS %"PRId64" for picture %u", - i_pts, u_pnum ); + p_block->i_pts, u_pnum ); } /***************************************************************************** @@ -258,7 +256,7 @@ static void SchroFrameFree( SchroFrame *frame, void *priv) if( !p_free ) return; - p_free->p_dec->pf_vout_buffer_del( p_free->p_dec, p_free->p_pic ); + decoder_DeletePicture( p_free->p_dec, p_free->p_pic ); free(p_free); (void)frame; } @@ -276,7 +274,7 @@ static SchroFrame *CreateSchroFrameFromPic( decoder_t *p_dec ) if( !p_schroframe ) return NULL; - p_pic = p_dec->pf_vout_buffer_new( p_dec ); + p_pic = decoder_NewPicture( p_dec ); if( !p_pic ) return NULL;