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 348677 - Upgrade to 0.10.9 breaks existing applications (failed segment->format assert)
Upgrade to 0.10.9 breaks existing applications (failed segment->format assert)
Status: VERIFIED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.9
Other All
: Normal normal
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-25 18:42 UTC by Kai Vehmanen
Modified: 2006-07-27 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the bug described in gst-plugins-base (917 bytes, patch)
2006-07-26 12:27 UTC, Kai Vehmanen
committed Details | Review

Description Kai Vehmanen 2006-07-25 18:42:25 UTC
Please describe the problem:
After upgrade to 0.10.9, sofsip_cli stops working. GST_DEBUG shows errors such as 

(test_media:23177): GStreamer-CRITICAL **: gst_segment_set_newsegment_full: assertion `segment->format == format' failed

(test_media:23177): GStreamer-CRITICAL **: gst_segment_clip: assertion `segment->format == format' failed
DEBUG (0x80e0790 - 0:00:01.049806000)        baseaudiosink(23177) gstbaseaudiosink.c(657):gst_base_audio_sink_render:<audiosink> dropping sample out of segment time 37:39:21.620125000, start 0:00:00.000000000



Steps to reproduce:
1. Running the test_media program of sofsip-cli package with gstreamer, gst-plugins-base and gst-plugins-good.
2. 
3. 


Actual results:
Critical assert failures are printed to gst logs. No audio is played back. 

Expected results:
The local audio recorded from microphone should be played back.

Does this happen every time?
Yes.

Other information:
Comment 1 Kai Vehmanen 2006-07-25 19:27:42 UTC
Downgrading to 0.10.8 (also tested with 0.10.7 and 0.10.6) of gstreamer and gst-plugins-good (or older) solves the problem. Upgrading back to 0.10.9 brings the problem back, so it is specific to 0.10.9.

To reproduce the problem:

cd sofsip-cli/src
sh> SOFSIP_AUDIO=OSS ./test_media

Running this test requires gstreamer, gst-plugins-{base,good}, sofia-sip-1.12.0 and
sofsip-cli-0.10.1 packages.

Only work-around I've found with gst*-0.10.9 is to set 'sync=FALSE' for the audio sink object. This seems to cure the problem when using OSS src/sink.

But clearly behaviour of the gst libs has changed between stable 0.10 releases.
Comment 2 Wim Taymans 2006-07-26 09:48:57 UTC
This exposes there is a bug somewhere upstream. A NEWSEGMENT event is generated in two different formats. It used to be silently ignored but the following commit that went in 0.10.9 made it assert again, see also #330379:

 * libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
 (gst_base_sink_preroll_object), (gst_base_sink_get_position):
 * libs/gst/base/gstbasetransform.c:
 (gst_base_transform_sink_eventfunc):
 * libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
 Don't randomly and silently reset a segment when the format
 changes as this is a bug somewhere upstream. Fixes #330379.

Can this be fixed in the upstream plugins?
Comment 3 Kai Vehmanen 2006-07-26 12:27:35 UTC
Created attachment 69659 [details] [review]
Fixes the bug described in gst-plugins-base

Found the problem. The gstbasertpdepayload element currently works so that when the jitterbuffer functionality is disabled, it passes any NEWSEGMENT events it receives (with jitterbuffer enabled, it create the NEWSEGMENTs itself and ignores any upstream events).

But this led to problems when the decoder element also sent a NEWSEGMENT, and in the wrong formant (GST_FORMAT_BYTES, not GST_FORMAT_TIME as it should be). And thus the assert in gstsegment.c.
Comment 4 Wim Taymans 2006-07-27 10:53:05 UTC
        patch by: Kai Vehmanen <kv2004 eca cx>

        * gst-libs/gst/rtp/gstbasertpdepayload.c:
        (gst_base_rtp_depayload_chain),
        (gst_base_rtp_depayload_handle_sink_event),
        (gst_base_rtp_depayload_change_state):
        Don't send multiple newsegments with different formats.
        Fixes #348677.