Commit 219bc812 authored by Laurent Aimar's avatar Laurent Aimar

* raw demuxers: few fixes, add es only after first packet. (size known)

parent eaefb850
......@@ -175,25 +175,23 @@ static int Demux( demux_t *p_demux)
{
block_t *p_next = p_block_out->p_next;
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_dts );
p_block_out->i_dts = p_sys->i_dts;
p_block_out->i_pts = p_sys->i_dts;
p_block_out->p_next = NULL;
if( p_sys->p_es == NULL )
{
p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_dts );
p_block_out->i_dts = p_sys->i_dts;
p_block_out->i_pts = p_sys->i_dts;
es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
p_block_out = p_next;
/* FIXME FIXME FIXME FIXME */
p_sys->i_dts += (int64_t)((double)1000000.0 / p_sys->f_fps);
/* FIXME FIXME FIXME FIXME */
}
}
return 1;
......
......@@ -172,12 +172,25 @@ static int Demux( demux_t *p_demux)
{
block_t *p_next = p_block_out->p_next;
if( p_sys->p_es == NULL )
{
p_sys->p_packetizer->fmt_out.b_packetized = VLC_TRUE;
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_dts );
p_block_out->p_next = NULL;
if( p_block_out->i_pts == p_block_out->i_dts )
{
p_block_out->i_pts = p_sys->i_dts;
}
else
{
p_block_out->i_pts = 0;
}
p_block_out->i_dts = p_sys->i_dts;
p_block_out->i_pts = 0;
p_block_out->p_next = NULL;
es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
p_block_out = p_next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment