Commit 65645005 authored by Gildas Bazin's avatar Gildas Bazin

* modules/demux/ps.[c,h]: fixed PSM parsing bug.

parent a1824ef1
......@@ -220,7 +220,9 @@ static int Demux( demux_t *p_demux )
break;
case 0x1bc:
/* msg_Dbg( p_demux, "received PSM"); */
if( p_sys->psm.i_version == 0xFFFF )
msg_Dbg( p_demux, "contains a PSM");
ps_psm_fill( &p_sys->psm, p_pkt, p_sys->tk, p_demux->out );
block_Release( p_pkt );
break;
......@@ -236,6 +238,10 @@ static int Demux( demux_t *p_demux )
{
tk->es = es_out_Add( p_demux->out, &tk->fmt );
}
else
{
msg_Dbg( p_demux, "es id=0x%x format unknown", i_id );
}
tk->b_seen = VLC_TRUE;
}
......@@ -416,7 +422,7 @@ static block_t *ps_pkt_read( stream_t *s, uint32_t i_code )
else
{
/* Normal case */
return stream_Block( s, i_size );
return stream_Block( s, i_size );
}
return NULL;
......
......@@ -430,7 +430,7 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
if( !p_psm || p_buffer[3] != 0xbc ) return VLC_EGENERIC;
i_length = (uint16_t)(p_buffer[4] << 8) + p_buffer[5];
i_length = (uint16_t)(p_buffer[4] << 8) + p_buffer[5] + 6;
if( i_length > i_buffer ) return VLC_EGENERIC;
//i_current_next_indicator = (p_buffer[6] && 0x01);
......
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