1. 15 Mar, 2021 1 commit
    • Martijn van Beurden's avatar
      Fix compression ratio display for very small files · ae288c06
      Martijn van Beurden authored and Erik de Castro Lopo's avatar Erik de Castro Lopo committed
      Because the compression ratio was calculated before processing
      the input of the last frame, it did not include the size of this
      last frame. This patch moves the calculation of the compression
      ratio after the new input has been processed. Now the compression
      ratio on very small files is correctly displayed.
      ae288c06
  2. 08 Dec, 2019 1 commit
  3. 01 Feb, 2019 1 commit
  4. 14 Feb, 2017 1 commit
    • Erik de Castro Lopo's avatar
      flac/encode.c: Fix an integer overflow · 3a7884bf
      Erik de Castro Lopo authored
      When encoding a 24 bit multichannel W64 file on a 32 bit system, a
      calculation could overflow resulting in a "got partial sample"
      error and early termination of the encoding process.
      
      The fix was to replace the cast to `size_t` (which is only 32 bits
      on a 32 bit system) with a cast to `uin64_t`.
      
      Thanks to Janne Hyvärinen for helping to track down the problem.
      
      Closes: https://sourceforge.net/p/flac/bugs/453
      3a7884bf
  5. 14 Jan, 2017 1 commit
  6. 04 Dec, 2016 1 commit
  7. 08 Jan, 2016 1 commit
  8. 24 Dec, 2015 1 commit
  9. 07 Sep, 2015 1 commit
  10. 30 Aug, 2015 1 commit
  11. 22 Feb, 2015 1 commit
    • Erik de Castro Lopo's avatar
      src/encode.c : Fix potential infinite loop in flac-toflac encoding. · 8267168d
      Erik de Castro Lopo authored
      A malformed file (generated by AFL) had a 'samples_left_to_process' value
      of greater than the actual numbe of samples. When re-encoding the decoder
      would get to the end of the file and then continuously return a decode
      status of FLAC__STREAM_DECODER_END_OF_STREAM, causing an infinite loop.
      
      Solution is to break out of the loop on two consecutive end-of-stream
      events.
      8267168d
  12. 17 Feb, 2015 1 commit
  13. 14 Dec, 2014 1 commit
  14. 25 Nov, 2014 1 commit
  15. 03 Jul, 2014 1 commit
  16. 02 Jul, 2014 1 commit
  17. 29 Jun, 2014 1 commit
  18. 28 Jun, 2014 2 commits
    • Erik de Castro Lopo's avatar
      flac: Fix channel order for mono files. · 99257e17
      Erik de Castro Lopo authored
      * The default channel mask for mono files was 0x0001 (front left) but it
        makes more sense to use 0x0004 (front center) for such files.
      
      * Also FLAC will accept not only mono WAV files with 0x0001 mask, but also
        with 0x0002 (requested at https://sourceforge.net/p/flac/bugs/390/)
        and 0x0004 (e.g. SoX creates mono files with this mask).
      
      * The comment about channel support was updated.
      
      * The error message
           "Use --channel-map=none option to store channels in current order; FLAC files
           must also be decoded with --channel-map=none to restore correct order."
        is misleading: FLAC never changes the order of channels.
        Decoding with this options also sets the channel mask of the resulting WAV
        file to 0. Without this option the mask is equal to the value of
        WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag.
      
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
      99257e17
    • Erik de Castro Lopo's avatar
      flac: Fix encoder and decode progress messages with --ogg. · 1d12d98e
      Erik de Castro Lopo authored
      Problem discussed here:
      
         http://lists.xiph.org/pipermail/flac-dev/2014-June/004808.html
      
      The values for the interval between two updates (e->stats_mask,
      e->stats_frames_interval) were set ~10 years ago, and it is small
      for current CPUs. It was now been increased too (0x3f -> 0xff, etc).
      The update interval is still less than 1 second.
      
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
      1d12d98e
  19. 27 Jun, 2014 2 commits
  20. 01 Jun, 2014 1 commit
  21. 24 Mar, 2014 1 commit
  22. 01 Feb, 2014 3 commits
    • Erik de Castro Lopo's avatar
      src/flac/encode.c : Improve perf of format_input() when compiled with MSVC. · 96011ffa
      Erik de Castro Lopo authored
      MSVS profiler shows that the encoder spends too much time inside format_input()
      when the input is 24-bit. Increases encoding speed:
      
      FLAC -5: from 27.1 to 24.2 seconds
      FLAC -8: from 76.2 to 73.1 seconds
      (MSVS 2010, 32-bit flac.exe, 24-bit stereo input file)
      
      For GCC compiles the encoding speed remains the same. I suspect that GCC is
      smart enough to use strict aliasing rule to optimize the code, and MSVS doesn't
      even know about it.
      
      Path-from: lvqcl <lvqcl.mail@gmail.com>
      96011ffa
    • Erik de Castro Lopo's avatar
      src/flac/main.c : Change the default beahviour when compression fails. · 48133110
      Erik de Castro Lopo authored
      Previously the flac executable would return a non-zero exit code when the
      output file was bigger than the input file and this could be disabled with
      the --no-error-on-compression-fail option.
      
      New beaviour is to print the failure message but return a zero exit code
      in the above situation, and only return a non-zero exit code with the
      --error--on-compression-fail option. The --no-error-on-compression-fail
      command line option has been retained.
      48133110
    • Erik de Castro Lopo's avatar
      src/flac/encode.c : Improve message when compression fails. · 37a97a59
      Erik de Castro Lopo authored
      As suggested by Brian Willoughby this is not an "ERROR" but a "FAILURE".
      Also list a couple of possible causes of this failure and remove the
      suggestion to contact the developers.
      37a97a59
  23. 01 Aug, 2013 1 commit
  24. 21 Jul, 2013 1 commit
  25. 26 May, 2013 1 commit
  26. 28 Apr, 2013 1 commit
  27. 21 Apr, 2013 2 commits
  28. 29 Mar, 2013 2 commits
  29. 19 Mar, 2013 1 commit
  30. 17 Mar, 2013 1 commit
  31. 14 Mar, 2013 1 commit
  32. 10 Mar, 2013 2 commits
  33. 02 Mar, 2013 1 commit
    • Erik de Castro Lopo's avatar
      Add appropriate WAV channel masks for 7 and 8 channel files. · c8adb080
      Erik de Castro Lopo authored
      This commit accepts the new default channel masks for 6.1 and 7.1
      surround input WAV files, and writes the corresponding masks when
      decoding to WAV without a channel mask from the metadata block.
      
      The local copy of the format spec is also updated with the new text
      from the flac-website repository.
      
      Patch from Ralph Giles <giles@mozilla.com>
      c8adb080