GNOME Bugzilla – Bug 733226
katedec: properly handle segment and caps events
Last modified: 2014-07-21 15:49:51 UTC
katedec doesn't read the streamheaders from caps and causes playback to fails when playback doesn't start from the beginning of the file (where the streamheaders are). It also fails to handle segment events properly. The following patches fix this.
Created attachment 280758 [details] [review] katedec: handle streamheaders in caps Properly handle the caps event by configuring the kate decoding lib using the available streamheaders. This makes it possible to decode kate subtitles when the stream is seeked before katedec gets the initial buffers that are usually the streamheaders.
Created attachment 280759 [details] [review] katedec: handle segment event earlier Delaying the segment event to when caps are decided can cause issues as the first thing katedec does on its chain function it doing a segment clip. It will lead to an assertion if the segment format is undefined
Comment on attachment 280759 [details] [review] katedec: handle segment event earlier You'll need to make sure however that segment events are always sent after the caps event
(In reply to comment #3) > (From update of attachment 280759 [details] [review]) > You'll need to make sure however that segment events are always sent after the > caps event It will be sent on the same order it is received. I guess we should assume that upstream will send it in the correct order, otherwise the bug is in upstream.
Is katedec always sending a caps event immediately when it receives on itself? Or can it in theory be delayed until it parsed a buffer or two?
It delays events (except stream-start) to after it got the stream headers so it can push the caps before pushing the other events (segment and tags, usually). This patch only makes it apply the segment to its internal attribute, but it will only forward it downstream after it has processed the headers and set a caps.
commit e26e112e80c4d3462d98421a2c9fe144215234f2 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Tue Jul 15 16:42:57 2014 -0300 katedec: handle segment event earlier Delaying the segment event to when caps are decided can cause issues as the first thing katedec does on its chain function it doing a segment clip. It will lead to an assertion if the segment format is undefined https://bugzilla.gnome.org/show_bug.cgi?id=733226 commit b0e63bbb9bde4fe5c53db23ae7539c43f1e5f549 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Tue Jul 15 16:41:51 2014 -0300 katedec: handle streamheaders in caps Properly handle the caps event by configuring the kate decoding lib using th available streamheaders. This makes it possible to decode kate subtitles whe the stream is seeked before katedec gets the initial buffers that are usuall the streamheaders. https://bugzilla.gnome.org/show_bug.cgi?id=733226