Menu

#453 Error "got partial sample" when encoding from big w64 file with 6 channels, 24bit 96 kHz.

1.3.x
closed-fixed
nobody
None
5
2017-02-15
2017-02-12
Andrew
No

I'm trying to encode w64 file which is 6 channels, 24 bit, 96 kHz, 4.11 GB.
After 3% of encoding flac encoder 1.3.2 gives out error "got partial sample" and stops encoding.

flac.exe -0 "D:\music\The Alan Parsons Project 1976 Tales Of Mystery And Imagination.w64" -o "D:\music\The Alan Parsons Project 1976 Tales Of Mystery And Imagination.flac"

flac 1.3.2
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

The Alan Parsons Project 1976 Tales Of Mystery And Imagination.w64: 3% complete, ratio=0,480The Alan Parsons Project 1976 Tales Of Mystery And Imagination.w64: ERROR: got partial sample

This w64 can be encoded with wavpack without any problems and resulted wv file is bit-identical to original.

Mediainfo of w64:

omplete name : D:\music\The Alan Parsons Project 1976 Tales Of Mystery And Imagination===.w64
Format : Wave64
File size : 4.11 GiB
Duration : 42 min 35 s
Overall bit rate mode : Constant
Overall bit rate : 13.8 Mb/s

Audio
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 00001000-0000-0100-8000-00AA00389B71
Duration : 42 min 35 s
Bit rate mode : Constant
Bit rate : 13.8 Mb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 96.0 kHz
Bit depth : 24 bits
Stream size : 4.11 GiB (100%)

I cannot share this file here beacause it is very big and this is copyrighted material. But i can upload it somwhere and PM someone with link.

Discussion

  • Andrew

    Andrew - 2017-02-12

    Also ffmpeg can encode this file to flac and resulted file is OK, when veryfied with flac.exe.

     
  • Erik

    Erik - 2017-02-13

    Ok, you're on Windows right? Is that 32 or 64 bit?

    And where did you get the executable? Official download? Compile it yourself? If you compiled it yourself, using what build system and tool chain.

    I downloaded the noise.w64 file (took hours because my internet connection is shit) and it seems like a well formed W64 file and encoded correctly on my system (x86_64/linux).

     
  • Andrew

    Andrew - 2017-02-13

    I'm using Windows 7 ultimate 32 bit on PC with core i3 3245, 4GB RAM and flac is official compile from xiph.org - http://downloads.xiph.org/releases/flac/flac-1.3.2-win.zip

    I just tried 1.3.1 (also official compile) and it works OK.

     

    Last edit: Andrew 2017-02-13
  • Janne H

    Janne H - 2017-02-13

    There was an overflow in a variable causing incorrect data read size. Patch attached.

     
    • Erik

      Erik - 2017-02-14

      Thanks for the quick response Janne. While the cast to size_t is wrong, I think we should replace it with a cast to uint64_t which is what the code actually does without the cast. The cast would make it explicit.

       

      Last edit: Erik 2017-02-14
  • Erik

    Erik - 2017-02-15
    • status: open --> closed-fixed
     
  • Erik

    Erik - 2017-02-15

    Fixed in commit:

    commit 3a7884bf532b134804a83632527d2de9a6b25a30
    Author: Erik de Castro Lopo <erikd@xxxx-xxxx.com>
    Date:   Tue Feb 14 21:21:54 2017 +1100
    
    flac/encode.c: Fix an integer overflow
    
     

Log in to post a comment.