Commit 01f05de9 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: mp4: fix naming of objectProfileIndication

parent ab27e26c
......@@ -1212,7 +1212,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET1BYTE( i_type );
if( i_type == 0x03 ) /* MP4ESDescrTag */
if( i_type == 0x03 ) /* MP4ESDescrTag ISO/IEC 14496-1 8.3.3 */
{
i_len = MP4_ReadLengthDescriptor( &p_peek, &i_read );
......@@ -1258,7 +1258,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET1BYTE( i_type ); /* get next type */
}
if( i_type != 0x04)/* MP4DecConfigDescrTag */
if( i_type != 0x04)/* MP4DecConfigDescrTag ISO/IEC 14496-1 8.3.4 */
{
es_descriptor.p_decConfigDescr = NULL;
MP4_READBOX_EXIT( 1 ); /* rest isn't interesting up to now */
......@@ -1276,7 +1276,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
if( unlikely( es_descriptor.p_decConfigDescr == NULL ) )
MP4_READBOX_EXIT( 0 );
MP4_GET1BYTE( es_descriptor.p_decConfigDescr->i_objectTypeIndication );
MP4_GET1BYTE( es_descriptor.p_decConfigDescr->i_objectProfileIndication );
MP4_GET1BYTE( i_flags );
es_descriptor.p_decConfigDescr->i_streamType = i_flags >> 2;
es_descriptor.p_decConfigDescr->b_upStream = ( i_flags >> 1 )&0x01;
......@@ -1284,7 +1284,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( es_descriptor.p_decConfigDescr->i_max_bitrate );
MP4_GET4BYTES( es_descriptor.p_decConfigDescr->i_avg_bitrate );
MP4_GET1BYTE( i_type );
if( i_type != 0x05 )/* MP4DecSpecificDescrTag */
if( i_type != 0x05 )/* MP4DecSpecificDescrTag ISO/IEC 14496-1 8.3.5 */
{
es_descriptor.p_decConfigDescr->i_decoder_specific_info_len = 0;
es_descriptor.p_decConfigDescr->p_decoder_specific_info = NULL;
......
......@@ -766,7 +766,7 @@ typedef struct MP4_Box_data_cprt_s
/* DecoderConfigDescriptor */
typedef struct MP4_descriptor_decoder_config_s
{
uint8_t i_objectTypeIndication;
uint8_t i_objectProfileIndication;
uint8_t i_streamType;
int b_upStream;
int i_buffer_sizeDB;
......
......@@ -2709,6 +2709,8 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
/* now see if esds is present and if so create a data packet
with decoder_specific_info */
/* Only if MP4V */
#define p_decconfig p_esds->data.p_esds->es_descriptor.p_decConfigDescr
if( ( ( p_esds = MP4_BoxGet( p_sample, "esds" ) ) ||
( p_esds = MP4_BoxGet( p_sample, "wave/esds" ) ) )&&
......@@ -2716,7 +2718,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
( p_decconfig ) )
{
/* First update information based on i_objectTypeIndication */
switch( p_decconfig->i_objectTypeIndication )
switch( p_decconfig->i_objectProfileIndication )
{
case( 0x20 ): /* MPEG4 VIDEO */
p_track->fmt.i_codec = VLC_CODEC_MP4V;
......@@ -2809,8 +2811,8 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
default:
/* Unknown entry, but don't touch i_fourcc */
msg_Warn( p_demux,
"unknown objectTypeIndication(0x%x) (Track[ID 0x%x])",
p_decconfig->i_objectTypeIndication,
"unknown objectProfileIndication(0x%x) (Track[ID 0x%x])",
p_decconfig->i_objectProfileIndication,
p_track->i_track_ID );
break;
}
......
Supports Markdown
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