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 615793 - [flactag] when used after flacenc: gst_adapter_take_buffer: assertion `nbytes > 0'
[flactag] when used after flacenc: gst_adapter_take_buffer: assertion `nbytes...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-14 22:38 UTC by Tim-Philipp Müller
Modified: 2010-04-15 09:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flactag: fix adapter assertion when used directly after flacenc (1.60 KB, patch)
2010-04-14 22:52 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2010-04-14 22:38:41 UTC
When used after flacenc like this:

 gst-launch-0.10 audiotestsrc ! flacenc ! flactag ! fakesink

there's an initial warning:

  ** CRITICAL **: gst_adapter_take_buffer: assertion `nbytes > 0' failed

because it doesn't check if there are bytes available in the adapter.
Comment 1 Tim-Philipp Müller 2010-04-14 22:52:16 UTC
Created attachment 158764 [details] [review]
flactag: fix adapter assertion when used directly after flacenc

    flactag: fix adapter assertion when used directly after flacenc
    
    Unlike filesrc, flacenc outputs the flac blocks neatly aligned one in
    each buffer. This means that when we switch from metadata mode to
    audio data passthrough mode, there's no data left in the adapter to
    push out at this point, so check if there's data in the adapter
    before requesting buffers from it (also needed in case we get input
    buffers of 0 size).
    
    Fixes #615793.
Comment 2 Sebastian Dröge (slomo) 2010-04-15 08:21:04 UTC
Comment on attachment 158764 [details] [review]
flactag: fix adapter assertion when used directly after flacenc

Looks good to me