GNOME Bugzilla – Bug 610959
[flacdec] certain flac-in-ogg file only plays after long delay
Last modified: 2010-03-08 18:51:35 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.
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?
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
Created attachment 155515 [details] Demonstration file for long pause before playback gst-launch playbin2 uri=file:///tmp/tone.flac.ogg
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
> 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.
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"
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.