Commit f9b6a994 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ps: fix regression with extended stream id

parent bcf1f6aa
......@@ -182,7 +182,8 @@ static int OpenCommon( vlc_object_t *p_this, bool b_force )
if( memcmp( p_header, startcode, 3 ) ||
( (p_header[3] & 0xB0) != 0xB0 &&
!(p_header[3] >= 0xC0 && p_header[3] <= 0xEF) &&
p_header[3] != 0xFF ) )
p_header[3] != PS_STREAM_ID_EXTENDED &&
p_header[3] != PS_STREAM_ID_DIRECTORY ) )
return VLC_EGENERIC;
ssize_t i_pessize = ps_pkt_size( p_header, 16 );
......@@ -481,6 +482,7 @@ static int Demux( demux_t *p_demux )
}
//ft
case PS_STREAM_ID_PRIVATE_STREAM1:
case PS_STREAM_ID_EXTENDED:
{
int i_id = ps_pkt_id( p_pkt );
/* Small heuristic to improve MLP detection from AOB */
......
......@@ -32,6 +32,7 @@
#define PS_STREAM_ID_MAP 0xBC
#define PS_STREAM_ID_PRIVATE_STREAM1 0xBD
#define PS_STREAM_ID_PADDING 0xBE
#define PS_STREAM_ID_EXTENDED 0xFD
#define PS_STREAM_ID_DIRECTORY 0xFF
/* 256-0xC0 for normal stream, 256 for 0xbd stream, 256 for 0xfd stream, 8 for 0xa0 AOB stream */
......
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