xiph / xiph/flac

flac -t shows FLAC__STREAM_DECODER_END_OF_STREAM since version 1.4.0 for some files

Open
#487 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

command-line tools enhancement/wish
Dominant language
C
Stars
2.4k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

I regularly run a flac -t check for my music collection. After upgrading from version 1.3.4 to version 1.4.1 (1.4.0 is also affected) some tests fail with FLAC__STREAM_DECODER_END_OF_STREAM that where ok before.

Only a minority of my files are affected. Most of them are still returning OK as test result. This happens for the complete Album at once, i.e., if one file on an album is affected every other file on the album is affected as well. Thus, this might has to do with specific encoders or parameters of the encoder.

I am running a Linux build using the gentoo packages of flac. Since the files have a copyright I cannot upload an afffected file here. However, I am willing to execute further tests if needed.

$ flac -t 01\ -\ Tomzen\ -\ Namaste.flac 

flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  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.

01 - Tomzen - Namaste.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


01 - Tomzen - Namaste.flac: ERROR during decoding
                            state = FLAC__STREAM_DECODER_END_OF_STREAM
$ flac -t 01\ -\ Tomzen\ -\ Namaste.flac 

flac 1.3.4
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.

01 - Tomzen - Namaste.flac: ok
$ metaflac --list 01\ -\ Tomzen\ -\ Namaste.flac 
METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minimum blocksize: 4096 samples
  maximum blocksize: 4096 samples
  minimum framesize: 2636 bytes
  maximum framesize: 13872 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 20815200
  MD5 signature: 7bc6b20fdbb16a7c1b9c13c27d810ce7
METADATA block #1
  type: 3 (SEEKTABLE)
  is last: false
  length: 864
  seek points: 48
    point 0: sample_number=0, stream_offset=0, frame_samples=4096
    point 1: sample_number=438272, stream_offset=751796, frame_samples=4096
    point 2: sample_number=880640, stream_offset=1812843, frame_samples=4096
    point 3: sample_number=1318912, stream_offset=2793114, frame_samples=4096
    point 4: sample_number=1761280, stream_offset=3765922, frame_samples=4096
    point 5: sample_number=2203648, stream_offset=4786522, frame_samples=4096
    point 6: sample_number=2641920, stream_offset=5930373, frame_samples=4096
    point 7: sample_number=3084288, stream_offset=7001573, frame_samples=4096
    point 8: sample_number=3526656, stream_offset=8158135, frame_samples=4096
    point 9: sample_number=3964928, stream_offset=9199557, frame_samples=4096
    point 10: sample_number=4407296, stream_offset=10227280, frame_samples=4096
    point 11: sample_number=4849664, stream_offset=11312059, frame_samples=4096
    point 12: sample_number=5287936, stream_offset=12403741, frame_samples=4096
    point 13: sample_number=5730304, stream_offset=13497013, frame_samples=4096
    point 14: sample_number=6172672, stream_offset=14601250, frame_samples=4096
    point 15: sample_number=6610944, stream_offset=15648734, frame_samples=4096
    point 16: sample_number=7053312, stream_offset=16555210, frame_samples=4096
    point 17: sample_number=7495680, stream_offset=17623860, frame_samples=4096
    point 18: sample_number=7933952, stream_offset=18731708, frame_samples=4096
    point 19: sample_number=8376320, stream_offset=19815916, frame_samples=4096
    point 20: sample_number=8818688, stream_offset=20967909, frame_samples=4096
    point 21: sample_number=9256960, stream_offset=22240334, frame_samples=4096
    point 22: sample_number=9699328, stream_offset=23374822, frame_samples=4096
    point 23: sample_number=10141696, stream_offset=24605882, frame_samples=4096
    point 24: sample_number=10579968, stream_offset=25792228, frame_samples=4096
    point 25: sample_number=11022336, stream_offset=26990143, frame_samples=4096
    point 26: sample_number=11464704, stream_offset=28178133, frame_samples=4096
    point 27: sample_number=11902976, stream_offset=29364966, frame_samples=4096
    point 28: sample_number=12345344, stream_offset=30427390, frame_samples=4096
    point 29: sample_number=12787712, stream_offset=31501062, frame_samples=4096
    point 30: sample_number=13225984, stream_offset=32594946, frame_samples=4096
    point 31: sample_number=13668352, stream_offset=33642831, frame_samples=4096
    point 32: sample_number=14110720, stream_offset=34697026, frame_samples=4096
    point 33: sample_number=14548992, stream_offset=35825976, frame_samples=4096
    point 34: sample_number=14991360, stream_offset=36994595, frame_samples=4096
    point 35: sample_number=15433728, stream_offset=38107034, frame_samples=4096
    point 36: sample_number=15872000, stream_offset=39228709, frame_samples=4096
    point 37: sample_number=16314368, stream_offset=40430342, frame_samples=4096
    point 38: sample_number=16756736, stream_offset=41596540, frame_samples=4096
    point 39: sample_number=17195008, stream_offset=42705300, frame_samples=4096
    point 40: sample_number=17637376, stream_offset=43864950, frame_samples=4096
    point 41: sample_number=18079744, stream_offset=45076327, frame_samples=4096
    point 42: sample_number=18518016, stream_offset=46180114, frame_samples=4096
    point 43: sample_number=18960384, stream_offset=47280556, frame_samples=4096
    point 44: sample_number=19402752, stream_offset=48289111, frame_samples=4096
    point 45: sample_number=19841024, stream_offset=49117444, frame_samples=4096
    point 46: sample_number=20283392, stream_offset=49863974, frame_samples=4096
    point 47: sample_number=20725760, stream_offset=50504294, frame_samples=4096
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 275
  vendor string: reference libFLAC 1.1.3 20061120
  comments: 11
    comment[0]: TITLE=Namaste
    comment[1]: ARTIST=Tomzen
    comment[2]: ALBUMARTIST=Various Artists
    comment[3]: ALBUM=Floating Point 01
    comment[4]: DISCNUMBER=1
    comment[5]: TRACKNUMBER=1
    comment[6]: GENRE=Ambient
    comment[7]: DATE=2003
    comment[8]: PUBLISHER=Iboga Records
    comment[9]: ORGANIZATION=Iboga Records
    comment[10]: LABEL=Iboga Records
METADATA block #3
  type: 1 (PADDING)
  is last: true
  length: 8081

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with 01 - Tomzen - Namaste.flac using flac -t from versions 1.3.4 and 1.4.1, and inspect the metadata with metaflac --list as shown. Compare the decoder results and establish a regression test using an affected file or equivalent fixture; done means valid files no longer report the 1.4.x error while genuine stream errors remain detectable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.