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 547075 - [speex] Encoder doesn't handle non-zero start timestamps and discontinuities properly
[speex] Encoder doesn't handle non-zero start timestamps and discontinuities ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-09 14:48 UTC by Sebastian Dröge (slomo)
Modified: 2008-08-31 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2008-08-09 14:48:15 UTC
Hi,
the speex encoder (and also the celt encoder which is more or less the same code) doesn't handle non-zero start timestamps and discontinuities properly. It simply starts to count at 0 and ignores all upstream timestamps.

This can lead to a/v synchronization issues when muxing together with video.

The fix for this is probably to a) get the start timestamp and offset all timestamps and granulepos with that and b) if a discontinuity is detected encode everything in the GstAdapter (if necessary add some silence) and then continue to encode the discont buffer and all following with the new timestamps.
Comment 1 Sebastian Dröge (slomo) 2008-08-31 14:39:52 UTC
2008-08-31  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        * ext/speex/gstspeexdec.c: (speex_dec_chain_parse_data):
        Correctly take the granulepos from upstream if possible and
        correctly handle the granulepos in various calculations: the
        granulepos is the sample number of the _last_ sample in a frame, not
        the first. 

        * ext/speex/gstspeexenc.c: (gst_speex_enc_sinkevent),
        (gst_speex_enc_encode), (gst_speex_enc_chain),
        (gst_speex_enc_change_state):
        * ext/speex/gstspeexenc.h:
        Handle non-zero start timestamps in the encoder and detect/handle
        stream discontinuities. Fixes bug #547075.
Comment 2 Sebastian Dröge (slomo) 2008-08-31 15:01:17 UTC
2008-08-31  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        * ext/celt/gstceltdec.c: (celt_dec_chain_parse_data):
        Correctly take the granulepos from upstream if possible and
        correctly handle the granulepos in various calculations: the
        granulepos is the sample number of the _last_ sample in a frame, not
        the first.

        * ext/celt/gstceltenc.c: (gst_celt_enc_sinkevent),
        (gst_celt_enc_encode), (gst_celt_enc_chain),
        (gst_celt_enc_change_state):
        * ext/celt/gstceltenc.h:        
        Handle non-zero start timestamps in the encoder and detect/handle
        stream discontinuities. Fixes bug #547075.