GNOME Bugzilla – Bug 673102
[kateenc] Fixed buffer duration
Last modified: 2012-03-30 15:46:32 UTC
There was a weird hack in kateenc that was messing up the buffers durations : - /* Hack to flush each packet on its own page - taken off the CMML encoder element */ - GST_BUFFER_DURATION (buffer) = G_MAXINT64; - This was breaking seeking in a matroska file containing kate encoded subtitles for example with vlc, since the total track duration was completely wack... I do no understand what " flush each packet on its own page" could mean... unless it was like each subtitle buffer would display on a different frame but still it makes no sense to have the wrong duration.. I checked the CMML encoder.. found no reference or any similar code... Also, I think if there was really a problem with the duration it should be set to GST_CLOCK_TIME_NONE, not to G_MAXINT64... So unless somebody has a clear idea why this is needed ? Here's a patch to fix it by removing this "hack"
Created attachment 210887 [details] [review] path to remove the hack...
Oops this was already fixed see : https://bugzilla.gnome.org/show_bug.cgi?id=668833 commit e0b0604119fd7cfb2242605dcff10405ff0a1285 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Sat Jan 28 12:32:46 2012 +0000 kateenc: remove 'flush every packet' hack This is a bad hack which does not work with Matroska, and is now obsolete as similar code is not included in oggmux/oggstream. Setting as duplicate *** This bug has been marked as a duplicate of bug 668833 ***
> I do no understand what " flush each packet on its own page" could mean... > unless it was like each subtitle buffer would display on a different frame but > still it makes no sense to have the wrong duration.. I checked the CMML > encoder.. found no reference or any similar code... > > Also, I think if there was really a problem with the duration it should be set > to GST_CLOCK_TIME_NONE, not to G_MAXINT64... That was for hysterical raisins, and setting a very large packet duration (not no duration) was the only way to force oggmux to flush a page after the packet. Without this, oggmux would wait for another page to look at its timestamp before deciding whether to flush or not, as it was hoping it could wait for more data to fit more onto a page - but next kate buffer could be seconds or minutes later. This is now obsolete as oggmux knows to flush discontinous codecs, but the hack had been forgotten till bug 668833 was reported. The original cmmlenc hack was removed in 2010.