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 608843 - [flacdec] Can't read tags in push mode
[flacdec] Can't read tags in push mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: 0.10.19
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 610964 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-02-02 22:56 UTC by dolphinling
Modified: 2010-02-24 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example file (456.09 KB, audio/ogg)
2010-02-03 17:48 UTC, dolphinling
  Details
flacdec: Only flush the FLAC decoder if it wasn't created right before (1.70 KB, patch)
2010-02-06 17:23 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description dolphinling 2010-02-02 22:56:08 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.)
Comment 1 Sebastian Dröge (slomo) 2010-02-03 15:52:54 UTC
Could you attach such a file with tags or give instructions on how to create one?
Comment 2 dolphinling 2010-02-03 17:48:45 UTC
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
Comment 3 Sebastian Dröge (slomo) 2010-02-05 17:37:17 UTC
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...
Comment 4 Sebastian Dröge (slomo) 2010-02-06 12:10:15 UTC
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 ;)
Comment 5 Sebastian Dröge (slomo) 2010-02-06 17:23:48 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2010-02-12 09:56:24 UTC
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.
Comment 7 dolphinling 2010-02-15 19:08:08 UTC
Wow. I was not expecting at all for this to be fixed so quickly. Huge thanks!
Comment 8 Sebastian Dröge (slomo) 2010-02-24 15:59:42 UTC
*** Bug 610964 has been marked as a duplicate of this bug. ***