static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
-vlc_module_begin();
- set_description( N_("PVA demuxer" ) );
- set_capability( "demux", 10 );
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_DEMUX );
- set_callbacks( Open, Close );
- add_shortcut( "pva" );
-vlc_module_end();
+vlc_module_begin ()
+ set_description( N_("PVA demuxer" ) )
+ set_capability( "demux", 10 )
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_DEMUX )
+ set_callbacks( Open, Close )
+ add_shortcut( "pva" )
+vlc_module_end ()
/*****************************************************************************
* Local prototypes
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
/* Register one audio and one video stream */
- es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', 'g', 'a' ) );
+ es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_MPGA );
+ fmt.b_packetized = false;
p_sys->p_audio = es_out_Add( p_demux->out, &fmt );
- es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+ es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
+ fmt.b_packetized = false;
p_sys->p_video = es_out_Add( p_demux->out, &fmt );
p_sys->i_vc = -1;
if( ( p_frame = p_sys->p_es ) )
{
- if( p_frame->i_pts > 0 && !p_sys->b_pcr_audio )
+ if( p_frame->i_pts > VLC_TS_INVALID && !p_sys->b_pcr_audio )
{
es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_frame->i_pts);
}
{
p_frame->p_buffer += i_skip;
p_frame->i_buffer -= i_skip;
- if( i_pts > 0 ) p_frame->i_pts = i_pts * 100 / 9;
+ if( i_pts >= 0 )
+ p_frame->i_pts = VLC_TS_0 + i_pts * 100 / 9;
block_ChainAppend( &p_sys->p_es, p_frame );
}
break;
if( ( i64 = stream_Size( p_demux->s ) ) > 0 )
{
pf = (double*) va_arg( args, double* );
- *pf = (double)stream_Tell( p_demux->s ) / (double)i64;
+ double current = stream_Tell( p_demux->s );
+ *pf = current / (double)i64;
return VLC_SUCCESS;
}
return VLC_EGENERIC;
uint8_t hdr[30];
int i_pes_size;
- int i_skip;
+ unsigned i_skip;
mtime_t i_dts = -1;
mtime_t i_pts = -1;
p_pes->i_buffer -= i_skip;
p_pes->p_buffer += i_skip;
- if( i_dts >= 0 ) p_pes->i_dts = i_dts * 100 / 9;
- if( i_pts >= 0 ) p_pes->i_pts = i_pts * 100 / 9;
+ if( i_dts >= 0 )
+ p_pes->i_dts = VLC_TS_0 + i_dts * 100 / 9;
+ if( i_pts >= 0 )
+ p_pes->i_pts = VLC_TS_0 + i_pts * 100 / 9;
/* Set PCR */
if( p_pes->i_pts > 0 )