After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759118 - mxfdemux: IndexTableSegment handling is wrong
mxfdemux: IndexTableSegment handling is wrong
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 732294
Blocks:
 
 
Reported: 2015-12-07 12:37 UTC by Sebastian Dröge (slomo)
Modified: 2015-12-09 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mxfdemux: Fix handling of IndexTableSegments (17.85 KB, patch)
2015-12-08 16:18 UTC, Sebastian Dröge (slomo)
none Details | Review
mxfdemux: Fix handling of IndexTableSegments (17.84 KB, patch)
2015-12-08 16:18 UTC, Sebastian Dröge (slomo)
none Details | Review
mxfdemux: Fix handling of IndexTableSegments (18.30 KB, patch)
2015-12-08 16:20 UTC, Sebastian Dröge (slomo)
needs-work Details | Review

Description Sebastian Dröge (slomo) 2015-12-07 12:37:36 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.
Comment 1 Sebastian Dröge (slomo) 2015-12-08 13:51:01 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2015-12-08 15:19:20 UTC
Actually working on a patch for this now.
Comment 3 Sebastian Dröge (slomo) 2015-12-08 16:18:09 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2015-12-08 16:18:44 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2015-12-08 16:20:41 UTC
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 6 Sebastian Dröge (slomo) 2015-12-09 08:19:17 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2015-12-09 14:52:34 UTC
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