GNOME Bugzilla – Bug 608843
[flacdec] Can't read tags in push mode
Last modified: 2010-02-24 15:59:42 UTC
I have some files in ogg flac. The tags were written by Musicbrainz Picard. Running strings on the files verifies that the tags are present, though I don't know enough to say they're written correctly. Rhythmbox does not display the tags, and neither will gst-launch-0.10 -t playbin uri=file://, although both play the audio fine and both display tags for other filetypes. gst-plugins-base is 0.10.24 and gst-plugins-good is 0.10.16, both from gentoo's repositories. (I haven't tried 0.10.25/0.10.17, but the changelogs don't indicate any related changes.)
Could you attach such a file with tags or give instructions on how to create one?
Created attachment 152944 [details] Example file Here's a (short) example song with data from musicbrainz as tagged by picard. title=Vitamin C artist=シートベルツ album=Cowboy Bebop: No Disc
Right, there definitely is a problem here. When passing the data from oggdemux to flacdec, the metadata callback is never called. When storing the demuxed FLAC content on disc and playing it with flacdec from there, the tags are found and everything is fine. When playing the file with pushfilesrc the tags are not found again. So there seems to be problem in libflac when it's not able to seek...
Problem simply is, that the flac decoder is flushed when the first buffer is received (because of discont) and that changes libflac's decoder to frame-sync mode, in which it only accepts audio frames and no headers. I'll fix that later, should be quite trivial ;)
Created attachment 153150 [details] [review] flacdec: Only flush the FLAC decoder if it wasn't created right before If the FLAC decoder is flushed, its state will be set to frame-sync mode, which will sync to the next *audio* frame and makes it ignore all headers. This prevented tags and everything else to show up when using flacdec in push mode. Fixes bug #608843.
commit 27b203b030c8a80f26a8f7c35abbb53ca7c0b0c7 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sat Feb 6 18:19:27 2010 +0100 flacdec: Only flush the FLAC decoder if it wasn't created right before If the FLAC decoder is flushed, its state will be set to frame-sync mode, which will sync to the next *audio* frame and makes it ignore all headers. This prevented tags and everything else to show up when using flacdec in push mode. Fixes bug #608843.
Wow. I was not expecting at all for this to be fixed so quickly. Huge thanks!
*** Bug 610964 has been marked as a duplicate of this bug. ***