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 722397 - liveadder: handle gap buffer flag
liveadder: handle gap buffer flag
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-17 07:45 UTC by Michael Olbrich
Modified: 2014-06-03 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.66 KB, patch)
2014-01-17 07:45 UTC, Michael Olbrich
committed Details | Review

Description Michael Olbrich 2014-01-17 07:45:43 UTC
Created attachment 266528 [details] [review]
patch

Otherwise some buffers will be pushed downstream with the gap flag still set and e.g. a following volume only changes the volume of some buffers.
Comment 1 Olivier Crête 2014-01-17 22:08:30 UTC
Should probably only unset the GAP flag is neither buffer is a gap buffer..
Comment 2 Thiago Sousa Santos 2014-02-10 12:48:49 UTC
It seems to make sense to me, as GAP buffers should only contain silence and can be ignored for liveadder context.
Comment 3 Michael Olbrich 2014-05-20 12:43:22 UTC
Oliver: I don't think so. What must happen is this:

- 'oldbuffer' is the current buffer that will be sent downstraem later.
- 'buffer' is the new data that should be added.

If 'buffer' has the GAP flag set, then we just do nothing. If it doesn't, 
then things get interesting:
If 'oldbuffer' doesn't have the GAP flags set, then we can just add the 
data and everything works just fine.
If 'oldbuffer' the GAP flag set, its data must be zero, so adding works 
just fine. However we must remove the GAP flag, or downstream may ignore 
the data we just added.
This is an adder, so the we can only sent a GAP buffer if _all_ input
buffers are GAP buffer.
Comment 4 Olivier Crête 2014-06-03 19:00:18 UTC
@Michael: Makes sense. We probably want to add the case where oldbuffer has the gap flag set, then we can avoi adding and just replace oldbuffer with buffer. for the relevant portion.

Merged

Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date:   Mon Oct 14 16:14:42 2013 +0200

    liveadder: handle gap buffer flag
    
    Remove GAP flag unless both sides have gap data, ignore
    incoming data if it is gap data.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722397