After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 400686 - FLAC metadata editing corrupts file
FLAC metadata editing corrupts file
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Metadata
0.11.5
Other All
: Normal normal
: 2.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-25 17:40 UTC by HugoPalma
Modified: 2007-02-06 16:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description HugoPalma 2007-01-25 17:40:27 UTC
Please describe the problem:
When i open the flac file i can play it just fine.
After i edit for example the album name i can't play the flac file anymore. I just get a forbidden icon beside the file. I can't play the file with other player also(except vlc). So, it seems that editing the metadata and writing it to the file is corrupting it.
If i use EasyTag in the same file it works just fine.

This doesn't happen with all my flac files.


This only happens when i have the "Write metadata to file" option selected.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 HugoPalma 2007-01-25 18:15:23 UTC
Here's the ouput of metaflac.
Before i edit in Banshee:

METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minumum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 1735 bytes
  maximum framesize: 15298 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 10024224
  MD5 signature: da7400c58094da6a963e05ec0313a197
METADATA block #1
  type: 3 (SEEKTABLE)
  is last: false
  length: 396
  seek points: 22
    point 0: sample_number=0, stream_offset=0, frame_samples=4608
    point 1: sample_number=451584, stream_offset=1149639, frame_samples=4608
    point 2: sample_number=907776, stream_offset=2422397, frame_samples=4608
    point 3: sample_number=1363968, stream_offset=3701562, frame_samples=4608
    point 4: sample_number=1820160, stream_offset=5001740, frame_samples=4608
    point 5: sample_number=2276352, stream_offset=6301746, frame_samples=4608
    point 6: sample_number=2732544, stream_offset=7593302, frame_samples=4608
    point 7: sample_number=3188736, stream_offset=8897910, frame_samples=4608
    point 8: sample_number=3644928, stream_offset=10204154, frame_samples=4608
    point 9: sample_number=4096512, stream_offset=11506681, frame_samples=4608
    point 10: sample_number=4552704, stream_offset=12833791, frame_samples=4608
    point 11: sample_number=5008896, stream_offset=14150977, frame_samples=4608
    point 12: sample_number=5465088, stream_offset=15393018, frame_samples=4608
    point 13: sample_number=5921280, stream_offset=16540306, frame_samples=4608
    point 14: sample_number=6377472, stream_offset=17713332, frame_samples=4608
    point 15: sample_number=6833664, stream_offset=19053550, frame_samples=4608
    point 16: sample_number=7289856, stream_offset=20331814, frame_samples=4608
    point 17: sample_number=7741440, stream_offset=21598417, frame_samples=4608
    point 18: sample_number=8197632, stream_offset=22889474, frame_samples=4608
    point 19: sample_number=8653824, stream_offset=24218597, frame_samples=4608
    point 20: sample_number=9110016, stream_offset=25553273, frame_samples=4608
    point 21: sample_number=9566208, stream_offset=26891722, frame_samples=4608
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 40
  vendor string: reference libFLAC 1.1.2 20050205
  comments: 0
METADATA block #3
  type: 1 (PADDING)
  is last: true
  length: 4096



After i edit:

METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minumum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 1735 bytes
  maximum framesize: 15298 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 10024224
  MD5 signature: da7400c58094da6a963e05ec0313a197
METADATA block #1
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 141
  vendor string: reference libFLAC 1.1.2 20050205
  comments: 6
    comment[0]: TRACKTOTAL=0
    comment[1]: TITLE=flac
    comment[2]: ARTIST=Sonic Youth
    comment[3]: TRACKNUMBER=1
    comment[4]: DATE=0
    comment[5]: ALBUM=sonic01.flac
METADATA block #2
  type: 3 (SEEKTABLE)
  is last: false
  length: 396
  seek points: 22
    point 0: sample_number=0, stream_offset=0, frame_samples=4608
    point 1: sample_number=451584, stream_offset=1149639, frame_samples=4608
    point 2: sample_number=907776, stream_offset=2422397, frame_samples=4608
    point 3: sample_number=1363968, stream_offset=3701562, frame_samples=4608
    point 4: sample_number=1820160, stream_offset=5001740, frame_samples=4608
    point 5: sample_number=2276352, stream_offset=6301746, frame_samples=4608
    point 6: sample_number=2732544, stream_offset=7593302, frame_samples=4608
    point 7: sample_number=3188736, stream_offset=8897910, frame_samples=4608
    point 8: sample_number=3644928, stream_offset=10204154, frame_samples=4608
    point 9: sample_number=4096512, stream_offset=11506681, frame_samples=4608
    point 10: sample_number=4552704, stream_offset=12833791, frame_samples=4608
    point 11: sample_number=5008896, stream_offset=14150977, frame_samples=4608
    point 12: sample_number=5465088, stream_offset=15393018, frame_samples=4608
    point 13: sample_number=5921280, stream_offset=16540306, frame_samples=4608
    point 14: sample_number=6377472, stream_offset=17713332, frame_samples=4608
    point 15: sample_number=6833664, stream_offset=19053550, frame_samples=4608
    point 16: sample_number=7289856, stream_offset=20331814, frame_samples=4608
    point 17: sample_number=7741440, stream_offset=21598417, frame_samples=4608
    point 18: sample_number=8197632, stream_offset=22889474, frame_samples=4608
    point 19: sample_number=8653824, stream_offset=24218597, frame_samples=4608
    point 20: sample_number=9110016, stream_offset=25553273, frame_samples=4608
    point 21: sample_number=9566208, stream_offset=26891722, frame_samples=4608
METADATA block #3
  type: 1 (PADDING)
  is last: false
  length: 4096
METADATA block #4
  type: 1 (PADDING)
  is last: true
  length: 4683
Comment 2 Brian Kerrick Nickel 2007-01-25 21:10:48 UTC
Hi Hugo,

I'm the developer of TagLib# (the horrible library that is destroying your files). I am not entirely sure where the problem is occuring (although the output does show I'm doing something wrong with padding). Could you please tell me what program and options were used to write these files, and use metaflac on a file that does not get corrupted?

Thanks,
Brian
Comment 3 HugoPalma 2007-01-25 23:16:39 UTC
To create the flac files i first used the "bchunk -w" to split a wav file and cue into separate wav files. I then used the "soundconverter" application to convert wav into flac.

Here's the metaflac output of a file i can change metadata in Banshee and works fine:

METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minumum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 2819 bytes
  maximum framesize: 13735 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 5646157
  MD5 signature: 64fed2e8444c79a09a3ba806e39f9a7c
METADATA block #1
  type: 3 (SEEKTABLE)
  is last: false
  length: 216
  seek points: 12
    point 0: sample_number=0, stream_offset=0, frame_samples=4608
    point 1: sample_number=470016, stream_offset=846954, frame_samples=4608
    point 2: sample_number=940032, stream_offset=2021255, frame_samples=4608
    point 3: sample_number=1410048, stream_offset=3217626, frame_samples=4608
    point 4: sample_number=1880064, stream_offset=4447063, frame_samples=4608
    point 5: sample_number=2350080, stream_offset=5684266, frame_samples=4608
    point 6: sample_number=2820096, stream_offset=6872769, frame_samples=4608
    point 7: sample_number=3290112, stream_offset=8075203, frame_samples=4608
    point 8: sample_number=3760128, stream_offset=9159563, frame_samples=4608
    point 9: sample_number=4230144, stream_offset=10300652, frame_samples=4608
    point 10: sample_number=4704768, stream_offset=11466180, frame_samples=4608
    point 11: sample_number=5174784, stream_offset=12626389, frame_samples=4608
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 240
  vendor string: reference libFLAC 1.1.1 20041001
  comments: 8
    comment[0]: ARTIST=Pearl Jam
    comment[1]: DATE=04September06
    comment[2]: ALBUM=Pavilhao Atlantico, Lisbon, Portugal
    comment[3]: COMMENT=Copyright Pearl Jam 2006
    comment[4]: GENRE=alt rock
    comment[5]: DISCNUMBER=1
    comment[6]: TITLE=Wasted Reprise
    comment[7]: TRACKNUMBER=01
METADATA block #3
  type: 1 (PADDING)
  is last: true
  length: 3896
Comment 4 Brian Kerrick Nickel 2007-01-27 06:36:17 UTC
I've committed a patch to taglib-sharp which should update when you run "svn update" for banshee. (I don't know how long it will take to get to the anon server, so it could be a couple hours. I'm not sure of the cause of your problem, as I cannot duplicated it, but I've changed quite a few things which may stop the problem from occuring.