#808 Infinite loop on wav file (pcm format)

Gildas Desnos

I have discovered an infinite loop happening when parsing a WAV file of PCM format.
It happens in File_SmpteSt0337.cpp. It is probably due to a falty encoding, because it is caused by having a value of 2 for Container_Bits, while it is expected to be 16/20/24/32.

However, the file is working, even though it's legnth seems bugged.
It is supposed to be 5'44" while using VLC but its actual duration is about 20".

1 Attachments


  • Gildas Desnos
    Gildas Desnos

    I can provide the file by mail if needed

  • Please send the file to info@mediaarea.net

    • status: open --> pending
    • assigned_to: Jerome Martinez
    • Priority: 5 --> 9
    • status: pending --> open-accepted
  • FYI:
    00000000 Wave (12 bytes)
    0000000C Stream format - Audio (24 bytes)
    0000000C Header (8 bytes)
    0000000C Name: fmt
    00000010 Size: 16 (0x10)
    00000014 FormatTag: 1 (0x0001)
    00000016 Channels: 1 (0x0001)
    00000018 SamplesPerSec: 44100 (0xAC44)
    0000001C AvgBytesPerSec: 11025 (0x2B11)
    00000020 BlockAlign: 4 (0x0004)
    00000022 BitsPerSample: 16 (0x0010)

    You can see AvgBytesPerSec value, and it is wrong (8x less than SamplesPerSec*BitsPerSample*Channels/8, value was divided by 8 twice?)
    MediaInfo displays also 5'44" due to this bad value, I'll try to patch it too.

    Last edit: Jerome Martinez 2013-12-16
    • status: open-accepted --> closed-fixed