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 610959 - [flacdec] certain flac-in-ogg file only plays after long delay
[flacdec] certain flac-in-ogg file only plays after long delay
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.19
Other Linux
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-24 15:44 UTC by cb-gnomebugs
Modified: 2010-03-08 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file used to demonstrate the problem (50.00 KB, audio/ogg)
2010-02-24 15:44 UTC, cb-gnomebugs
  Details
Demonstration file for long pause before playback (761.56 KB, audio/ogg)
2010-03-08 02:09 UTC, cb-gnomebugs
  Details
flacdec: don't send second newsegment event in framed mode, fixes long playback delay (1.22 KB, patch)
2010-03-08 16:51 UTC, Tim-Philipp Müller
committed Details | Review

Description cb-gnomebugs 2010-02-24 15:44:31 UTC
Created attachment 154599 [details]
file used to demonstrate the problem

gstreamer is not able to decode the attached ogg flac file. (This has been truncated to the first 50k for file size, ogg123 can still decode it, and gstreamer can decode other similarly truncated files)

The failure to decode can be demonstrated in rhythmbox, or with the following command line.

gst-launch filesrc location=/tmp/aaa.flac.ogg ! decodebin name=flacdec ! audioconvert ! audioresample ! pulsesink

Fails with this error:

ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:flacdec GstFlacDec:flacdec1: Could not decode stream.
Additional debug info:
gstflacdec.c(660): gst_flac_dec_error_cb (): /GstPipeline:pipeline0/GstDecodeBin:flacdec/GstFlacDec:flacdec1:
bad header (1)

The platform is Fedora 12 on i386.
Comment 1 Sebastian Dröge (slomo) 2010-02-24 16:02:28 UTC
Plays fine here with gstreamer, gst-plugins-base 0.10.26.2 and gst-plugins-good 0.10.18.2. Which versions are you using? Can you confirm that it works with the latest releases or pre-releases?
Comment 2 cb-gnomebugs 2010-02-24 16:36:48 UTC
Using the latest versions available in Fedora 12 updates-testing, the same problem still exists.

The package versions I have tested with are:

$ rpm -qa | grep gstreagstreamer-plugins-base-0.10.26-1.fc12.i686
gstreamer-python-0.10.16-1.fc12.i686
gstreamer-0.10.26-1.fc12.i686
gstreamer-tools-0.10.26-1.fc12.i686
gstreamer-plugins-flumpegdemux-0.10.15-8.fc12.i686
PackageKit-gstreamer-plugin-0.5.6-1.fc12.i686
gstreamer-plugins-good-0.10.18-1.fc12.i686
Comment 3 cb-gnomebugs 2010-03-08 02:09:02 UTC
Created attachment 155515 [details]
Demonstration file for long pause before playback

gst-launch playbin2 uri=file:///tmp/tone.flac.ogg
Comment 4 cb-gnomebugs 2010-03-08 02:12:19 UTC
The failure to decode no longer happens, but there is a long pause (over 30 seconds) before OGG Flac files will play. See previous attachment for example.

I've forced the gstreamer-plugins-good-0.10.18.4 packge from F13 into the system, so that may be responsible, but it's the best I can do until Fedora build some up to date packages...

$ rpm -qa |grep gstream
gstreamer-plugins-base-0.10.26-1.fc12.i686
gstreamer-0.10.26-1.fc12.i686
gstreamer-python-0.10.16-1.fc12.i686
gstreamer-tools-0.10.26-1.fc12.i686
gstreamer-plugins-good-0.10.18.4-1.fc13.i686
gstreamer-plugins-flumpegdemux-0.10.15-8.fc12.i686
PackageKit-gstreamer-plugin-0.5.6-1.fc12.i686
Comment 5 Tim-Philipp Müller 2010-03-08 02:46:54 UTC
> The failure to decode no longer happens, but there is a long pause (over 30
> seconds) before OGG Flac files will play. See previous attachment for example.

Can reproduce this.
Comment 6 Tim-Philipp Müller 2010-03-08 14:43:51 UTC
It would seem that's because flacdec re-sends the initial newsegment event that oggdemux sent, but not as update:

$ gst-launch-0.10 filesrc location=610959.ogg ! oggdemux ! flacdec ! fakesink sync=true -v
flacdec0.GstPad:sink: caps = audio/x-flac, rate=(int)44100, channels=(int)1
flacdec0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1
fakesink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1
fakesink0: last-message = "preroll   ******* "
fakesink0: last-message = "event   ******* E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMA
T_TIME, start=(gint64)0, stop=(gint64)30000000000, position=(gint64)0;) 0x7fb5e400d440"
fakesink0: last-message = "event   ******* E (type: 118, taglist, container-format=(string)Ogg;) 0x7fb5e400d500"
fakesink0: last-message = "event   ******* E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMA
T_TIME, start=(gint64)0, stop=(gint64)30000000000, position=(gint64)0;) 0x7fb5e400d580"
Comment 7 Tim-Philipp Müller 2010-03-08 16:51:33 UTC
Created attachment 155566 [details] [review]
flacdec: don't send second newsegment event in framed mode, fixes long playback delay

    flacdec: don't send second newsegment event in framed mode, fixes long playback delay
    
    Don't send another newsegment event if the upstream muxer/parser has already
    sent one (otherwise the sink will wait for $duration before starting playback).
    Fixes long delay until playback starts with flac-in-ogg files.