X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fcodec%2Finvmem.c;h=7e96d27b00aaf967d5ed64991a24a09a6c304cc0;hb=2797ca1c04ec91cd293293f998badcb0d7f944be;hp=ca2fbd490971ce0e330b406af8195f4983721eae;hpb=0a090e3392306042adfbbe63a6cbab2f578d8224;p=vlc diff --git a/modules/codec/invmem.c b/modules/codec/invmem.c index ca2fbd4909..7e96d27b00 100644 --- a/modules/codec/invmem.c +++ b/modules/codec/invmem.c @@ -71,19 +71,11 @@ static picture_t *DecodeBlock ( decoder_t *, block_t ** ); #define LT_CHROMA N_("Output chroma for the memory image as a 4-character " \ "string, eg. \"RV32\".") -#define INVMEM_HELP N_( "This module make possible making video stream from raw-image " \ - "generating (to memory) from rendering program uses libvlc. " \ - "To use this module from libvlc set --codec to invmem, "\ - "set all --invmem-* options in vlc_argv an use " \ - "libvlc_media_new(libvlc, \"fake://\", &ex);. " \ - "Besides is simillar to vmem video output module." ) - vlc_module_begin() set_category( CAT_INPUT ) set_subcategory( SUBCAT_INPUT_VCODEC ) set_shortname( N_("Memory video decoder") ) set_description( N_("Memory video decoder") ) - set_help( INVMEM_HELP ) set_capability( "decoder", 50 ) set_callbacks( OpenDecoder, CloseDecoder ) add_shortcut( "invmem" ) @@ -212,7 +204,8 @@ static int OpenDecoder( vlc_object_t *p_this ) p_dec->fmt_out.i_codec = chroma; p_dec->fmt_out.video.i_width = p_dec->p_sys->i_width; p_dec->fmt_out.video.i_height = p_dec->p_sys->i_height; - p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * p_dec->p_sys->i_width / p_dec->p_sys->i_height; + p_dec->fmt_out.video.i_sar_num = 1; + p_dec->fmt_out.video.i_sar_den = 1; p_dec->fmt_out.i_cat = VIDEO_ES; p_sys->i_pitch = pitch; @@ -247,7 +240,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) if ( !p_pic ) return NULL; p_pic->b_force = true; p_pic->p->i_pitch = p_dec->p_sys->i_pitch; - p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts; + p_pic->date = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : p_block->i_dts; // lock input and copy to picture p_pic->p->p_pixels = p_sys->pf_lock( p_dec->p_sys->p_data );