]> git.tuebingen.mpg.de Git - paraslash.git/commit
FEC: Improve and simplify group timing.
authorAndre Noll <maan@systemlinux.org>
Fri, 27 Nov 2009 19:36:23 +0000 (20:36 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 27 Nov 2009 19:36:23 +0000 (20:36 +0100)
commitc817e921b447f42519ce605bb80dbb85bc7e2267
treecbab5fd643dffa855c4cb59c98847aa2f4ccc322
parent9c9fe68e8cf86514230993825559c61cadeae22a
FEC: Improve and simplify group timing.

The computation of the group start time was not as accurate as it
could be because it did not take into account that the first FEC
group has to be taken into account twice. This could lead to buffer
underruns between the first and the second group.

This patch fixes this flaw by computing the group start start(n)
of the nth FEC group as

start(n) = start(n - 1) + duration(n - 1),

which is not only more accurate but also a bit simpler than what we
had before. In order to do so, we have to remember the duration of
the previous group. The new ->duration member of struct fec_group is
used for this purpose.

The patch also renames set_slice_duration() to set_group_timing() as
this function now computes and stores both the slice duration and the
group duration.
vss.c