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 580133 - Regression in baseparse since last release
Regression in baseparse since last release
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-24 16:00 UTC by Jan Schmidt
Modified: 2009-05-03 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible patch (4.69 KB, patch)
2009-04-27 20:44 UTC, Mark Nauwelaerts
committed Details | Review

Description Jan Schmidt 2009-04-24 16:00:57 UTC
Commit ad2c7bffe7d94c79184904b14101cbc93eeb9ebd breaks the unit tests.

If I interpret the problem correctly, the old logic sent a newsegment, and then flushed any data in the adapter (presumably because it comes from the old segment).

The new logic flushes the adapter whenever there is a pending newsegment event, but doesn't send the newsegment until there is a complete frame. This leaves it in a state where until there is a single input buffer containing a full frame, the parser continuously flushes the adapter (containing part of a frame), and never pushes the newsegment event.

See gstbaseparse.c:886 for the offending gst_adapter_clear() code.

I would guess that the fix is to move the gst_adapter_clear() to a better location, possibly when the pending newsegment event is enqueued in the first place - as presumably any data after then comes from the new segment and needs to be separated from the old, incomplete, frames.
Comment 1 Mark Nauwelaerts 2009-04-27 20:44:06 UTC
Created attachment 133447 [details] [review]
Possible patch

Patch newsegment handling as suggested; looks reasonable and fixes unit test.
Comment 2 Jan Schmidt 2009-04-28 10:53:39 UTC
There is some weird logic about configuring the pending segment in pull-mode in  gst_base_parse_handle_seek(). I'm not sure it'll clear the adapter in that path now, but I don't follow the intent of the code well enough to be sure.
Comment 3 Mark Nauwelaerts 2009-04-28 17:58:47 UTC
It looks like pretty standard seek handling that prepares some newsegment events for the streaming thread (e.g. as in basesrc).  As far as I can tell/read/search/grep, the adapter is not used in pull mode, so that should be OK.
Comment 4 Mark Nauwelaerts 2009-05-01 20:29:47 UTC
Unless alternatives or objections, I'll be pushing the above fix prior to upcoming -bad freeze.
Comment 5 Mark Nauwelaerts 2009-05-03 12:54:15 UTC
commit 9bbacae78f5750825bd79ec332c0ff0105552c0f
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon Apr 27 22:39:15 2009 +0200

    baseparse: fix (regression in) newsegment handling

    (aacparse, amrparse, flacparse).  Fixes #580133.