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 337111 - flacenc output is incompatible with flacdec
flacenc output is incompatible with flacdec
Status: RESOLVED DUPLICATE of bug 337609
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.5
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-03 23:42 UTC by Michael Sheldon
Modified: 2006-04-08 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Sheldon 2006-04-03 23:42:20 UTC
A flac file created with the pipeline:

 alsasrc device=default ! audioconvert ! flacenc ! filesink location=test.flac

 Is unplayable with the pipeline:

 filesrc location=test.flac ! decodebin ! audioconvert ! alsasink device=default

 The decodebin recognises it as flac and initializes flacdec without any problems, 
but immediately after all elements reaching the play state they appear to reach the end of the stream and shutdown.

 The created file (test.flac) is playable in xine and recognised as flac, and the described output pipeline works with flac files produced by other flac encoders.
Comment 1 Tim-Philipp Müller 2006-04-08 14:05:20 UTC
This seems to be the same problem as bug #337609 and should be fixed in gst-plugins-good CVS now.

The problem is that if you use the above pipeline and then interrupt it with control-C the pipeline isn't stopped in a controlled way (so that an EOS is sent). Without that, flacenc doesn't write the actual number of samples written into the flac stream header, so the stream header contains total_samples = 0 (="don't know"), which flacdec didn't handle correctly until then.

A better way to do this with gst-launch would be:

  alsasrc device=default num-buffers=256 ! audioconvert ! flacenc ! filesink location=test.flac

That will shut the pipeline down cleanly and make flacenc fill in the header. If you need to shut down a pipeline like this programmatically from your own code you can do this as well without specifying the number of buffers in advance, see the GstBaseSrc online documentation for details on how to do that.



*** This bug has been marked as a duplicate of 337609 ***