GNOME Bugzilla – Bug 759118
mxfdemux: IndexTableSegment handling is wrong
Last modified: 2015-12-09 14:52:41 UTC
+++ This bug was initially created as a clone of Bug #732294 +++ First of all it is too simple and does not properly implement the algorithm from S377-1-2009c chapter 11. Then there are the following issues in the simple implementation currently - it assumes the index table segment position is somehow related to the position of the media. This is wrong, all index table segments could also e.g. be in the footer partition. (the segment->stream_offset field) - the de-duplication of the index table segments only looks at the start position. Look at ffmpeg for a better implementation. Ideally one would parse all the segments into a full, internal representation that combines all the segments.
Also it assumes that all tracks have the same edit rate and starts filling the (generated index) from the seek position, as such leaving a gap which is unsupported and will cause problems next time seeking will happen. I would suggest reverting that commit for now, it's completely wrong.
Actually working on a patch for this now.
Created attachment 316952 [details] [review] mxfdemux: Fix handling of IndexTableSegments This was completely broken before and could only work on a very constrained set of files. After these changes it should work except for situations where PTS != DTS, which is not handled at all in mxfdemux currently.
Created attachment 316953 [details] [review] mxfdemux: Fix handling of IndexTableSegments This was completely broken before and could only work on a very constrained set of files. After these changes it should work except for situations where PTS != DTS, which is not handled at all in mxfdemux currently.
Created attachment 316954 [details] [review] mxfdemux: Fix handling of IndexTableSegments This was completely broken before and could only work on a very constrained set of files. After these changes it should work except for situations where PTS != DTS, which is not handled at all in mxfdemux currently.
Comment on attachment 316954 [details] [review] mxfdemux: Fix handling of IndexTableSegments I have some files on which this doesn't work well, while ffmpeg handles the Index Table Segments correctly there.
commit 6d367d6b48d22c51af268fa0258a5bc111de9763 Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Dec 8 18:15:55 2015 +0200 mxfdemux: Fix handling of IndexTableSegments This was completely broken before and could only work on a very constrained set of files. After these changes it should work except for situations where PTS != DTS, which is not handled at all in mxfdemux currently. https://bugzilla.gnome.org/show_bug.cgi?id=759118