GNOME Bugzilla – Bug 615793
[flactag] when used after flacenc: gst_adapter_take_buffer: assertion `nbytes > 0'
Last modified: 2010-04-15 09:02:27 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.
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 on attachment 158764 [details] [review] flactag: fix adapter assertion when used directly after flacenc Looks good to me