diff --git a/modules/meta_engine/ID3Tag.h b/modules/meta_engine/ID3Tag.h index d60e965f6e0cb129481f2c8e7c72370bc55e31ba..40fd87f84da2b6037767cf5388a2b0fdfd3212c9 100644 --- a/modules/meta_engine/ID3Tag.h +++ b/modules/meta_engine/ID3Tag.h @@ -45,7 +45,7 @@ static size_t ID3TAG_Parse( const uint8_t *p_peek, size_t i_peek, uint32_t i_ID3size = 0; if( i_peek > 10 && ID3TAG_IsTag( p_peek, false ) ) { - const bool b_syncsafe = p_peek[5] & 0x80; + const uint8_t i_ID3major = p_peek[3]; i_ID3size = ID3TAG_ReadSize( &p_peek[6], true ); if( i_ID3size > i_peek - 10 ) return 0; @@ -54,7 +54,7 @@ static size_t ID3TAG_Parse( const uint8_t *p_peek, size_t i_peek, while( i_ID3size > 10 ) { uint32_t i_tagname = VLC_FOURCC( p_frame[0], p_frame[1], p_frame[2], p_frame[3] ); - uint32_t i_framesize = ID3TAG_ReadSize( &p_frame[4], b_syncsafe ) + 10; + uint32_t i_framesize = ID3TAG_ReadSize( &p_frame[4], i_ID3major != 3 ) + 10; if( i_framesize > i_ID3size ) return 0;