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 692868 - basesink: expands GAP event without duration to last to segment end
basesink: expands GAP event without duration to last to segment end
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.0.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-30 10:55 UTC by Tim-Philipp Müller
Modified: 2013-02-05 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2013-01-30 10:55:35 UTC
- playbin (with streamsynchronizer)

 - mp4 file with 4 seconds worth of data

 - segment is 0-22 minutes

 - ca. 4 seconds worth of buffers are sent

 - EOS events are sent

 - when receiving the video EOS event,
    streamsynchronizer makes up a GAP
    event with ts=4secs and no duration
    and sends it to the audio sink

 - audio sink waits until segment end
   before posting EOS.

The audio sink should treat the GAP event without duration like a buffer without duration, and post EOS pretty much immediately afterwards (the GAP event is followed by an EOS event).

Here's what goes wrong:

<AD-N770> __tim, wtay: http://dl.dropbox.com/u/4577541/gst.log
<AD-N770> this is the log for basesink, let me know if you want more categories and I will regen it
<AD-N770> 4 seconds of data and 22 min duration
<__tim> gst_base_sink_get_sync_times:<alsasink0> Got Gap time 0:00:04.272000000 duration 99:99:99.999999999
<__tim> so the GAP event generated by streamsynchronizer looks ok - agreed?
<AD-N770> I think so, but it seems that it may be the cause of sync the EOS at segment end
<__tim> but then this happens:
<__tim> gstbasesink.c:1876:gst_base_sink_get_sync_times:<alsasink0> got times start: 0:00:04.272000000, stop: 99:99:99.999999999, do_sync 1
<__tim> gstbasesink.c:1902:gst_base_sink_get_sync_times:<alsasink0> clipped to: start 0:00:04.272000000, stop: 0:22:49.896000000
<__tim> so the question is where it gets that stop from then
<__tim> well, we know where it's from (segment), but not where it's filled in
<AD-N770> __tim: do you mean that the gap event get the duration of the remaining lenght of stream
<AD-N770> and it causes the EOS being sync at buffer+duration of last, so the gap duration
<__tim> I think that's what's happening, yes
<AD-N770> well, I really can't dig on it now, but let me know if you want that I'll generate some logs or test a patch
<wtay> __tim, AD-N770 ah yes
<wtay> in that case, basesink calculates the stop time wrongly for items without a duration
<AD-N770> wtay: then is something to be changed in basesink?
<wtay> AD-N770, I would think so
Comment 1 Wim Taymans 2013-02-05 16:35:14 UTC
commit 2ea32f3ab55edc7858c792a66748d0a2d328a0f5
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Feb 5 17:19:50 2013 +0100

    basesink: handle sync of EOS after item without duration
    
    After a buffer or GAP without duration, an EOS event should be rendered
    immediately instead of waiting for the end of the segment.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692868