[Bug 719357] audiobasesink: does not drop late buffers

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Dec 19 12:04:17 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=719357
  GStreamer | gst-plugins-base | git

--- Comment #10 from Thiago Sousa Santos <thiago.sousa.santos at collabora.co.uk> 2013-12-19 20:04:15 UTC ---
(In reply to comment #8)
I don't understand this.

> align = sink->next_sample - sample_offset; ==0 means perfect, < 0 means the
> sample is to be played later than expected and thus alignment would play the
> sample earlier, > 0 the sample is to be played sooner than expected and thus
> alignment would delay playback.
> 
> The we have:
> 
>   /* don't align if it means writing behind the read-segment */
>   if (sample_diff > headroom && align < 0)
>     allow_align = FALSE;

If the align being negative means that the sample is to be played later than
expected, how does comparing "align < 0" make sense here to check if it is
before the read-segment?

-----|--------------------------|------------->
    current                    expected
    play position              sample offset

The headroom is the difference between those 2 positions, if the sample_diff
(difference between the sample offset and the expected sample offset) is 
greater than the headroom it means that we could end up writing it before the
current play position. We don't want this to happen. How does comparing with 
'align < 0" works here if it means that sample should be played later?

> 
> If the sample error is bigger than the diff between read and write pointer
> *and* alignment would make us play the sample earlier (earlier than the
> headroom, thus before the read pointer) then we don't align.
>

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list