]> git.sesse.net Git - vlc/commit
mux/ogg: Don't use granulepos = UINT64_MAX on EOS page
authorDavid Flynn <davidf@rd.bbc.co.uk>
Thu, 27 Nov 2008 11:58:52 +0000 (11:58 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 29 Nov 2008 10:13:49 +0000 (11:13 +0100)
commit85dd1a0b762517a9c6f1c721c30bdce233c25dd0
tree3695afb25fbfaf0c0223390de2ae7cd9a527f6b5
parentfaa5af57d09d24e6c0070373ceb65f867b0e74a9
mux/ogg: Don't use granulepos = UINT64_MAX on EOS page

It isn't legal for granulepos to be UINT64_MAX on an EOS page since
this special value indicates that no packets finish on the page, yet
an EOS page signifies that the final packet does finish on the page.

It seems that there is a convention for repeating the last used
granulepos in the EOS page per logical stream.  This then allows
some extra file size hints (duration = last gp - first gp) [1]

[1] This is flawed -- EOS may occur anywhere, however this is what
some people do.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Laurent Aimar <fenrir@videolan.org>
modules/mux/ogg.c