Changeset 3b29796137d524c8efa30e8f0753b2934c38bd26

Show
Ignore:
Timestamp:
02/18/08 18:14:27 (7 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1203354867 +0000
git-parent:

[b2bc5fb8a2fcabf00b6fa75452bc2cfc694c3f3a]

git-author:
Rafaël Carré <funman@videolan.org> 1203354867 +0000
Message:

compare the right amount of data, being a little bit more strict

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/ogg.c

    r99fab90 r3b29796  
    284284                if( p_stream->fmt.i_codec == VLC_FOURCC('t','h','e','o') && 
    285285                        oggpacket.bytes >= 7 && 
    286                         ! memcmp( oggpacket.packet, "\x80theora", 6 ) ) 
     286                        ! memcmp( oggpacket.packet, "\x80theora", 7 ) ) 
    287287                { 
    288288                    Ogg_ReadTheoraHeader( p_stream, &oggpacket ); 
     
    291291                else if( p_stream->fmt.i_codec == VLC_FOURCC('v','o','r','b') && 
    292292                        oggpacket.bytes >= 7 && 
    293                         ! memcmp( oggpacket.packet, "\x01vorbis", 6 ) ) 
     293                        ! memcmp( oggpacket.packet, "\x01vorbis", 7 ) ) 
    294294                { 
    295295                    Ogg_ReadVorbisHeader( p_stream, &oggpacket ); 
     
    783783                /* Check for Vorbis header */ 
    784784                if( oggpacket.bytes >= 7 && 
    785                     ! memcmp( oggpacket.packet, "\x01vorbis", 6 ) ) 
     785                    ! memcmp( oggpacket.packet, "\x01vorbis", 7 ) ) 
    786786                { 
    787787                    Ogg_ReadVorbisHeader( p_stream, &oggpacket ); 
     
    789789                } 
    790790                /* Check for Speex header */ 
    791                 else if( oggpacket.bytes >= 7 && 
     791                else if( oggpacket.bytes >= 5 && 
    792792                    ! memcmp( oggpacket.packet, "Speex", 5 ) ) 
    793793                { 
     
    833833                /* Check for Theora header */ 
    834834                else if( oggpacket.bytes >= 7 && 
    835                          ! memcmp( oggpacket.packet, "\x80theora", 6 ) ) 
     835                         ! memcmp( oggpacket.packet, "\x80theora", 7 ) ) 
    836836                { 
    837837                    Ogg_ReadTheoraHeader( p_stream, &oggpacket );