summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-03 20:00:34 +0100
committerwm4 <wm4@nowhere>2014-11-03 20:20:28 +0100
commit4e87ac823108a670a1a0c5f67ab9bcd6980bac33 (patch)
tree4e71fa69834ce2e7886f3870abc3b8766d1605c3 /TOOLS
parent93e1db0bff5fc48dffeb2dc94801436bdb459cd3 (diff)
downloadmpv-4e87ac823108a670a1a0c5f67ab9bcd6980bac33.tar.bz2
mpv-4e87ac823108a670a1a0c5f67ab9bcd6980bac33.tar.xz
demux_mkv: implement audio skipping/trimming
This mechanism was introduced for Opus, and allows correct skipping of "preroll" data, as well as discarding trailing audio if the file's length isn't a multiple of the audio frame size. Not sure how to handle seeking. I don't understand the purpose of the SeekPreRoll element. This was tested with correctness_trimming_nobeeps.opus, remuxed to mka with mkvmerge v7.2.0. It seems to be correct, although the reported file duration is incorrect (maybe a mkvmerge issue).
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lib/Parse/Matroska/Definitions.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/TOOLS/lib/Parse/Matroska/Definitions.pm b/TOOLS/lib/Parse/Matroska/Definitions.pm
index 081fe5bb97..b320e1f6c8 100644
--- a/TOOLS/lib/Parse/Matroska/Definitions.pm
+++ b/TOOLS/lib/Parse/Matroska/Definitions.pm
@@ -232,6 +232,7 @@ sub define_matroska {
elem('Block', 'a1', 'binary'),
elem('BlockDuration', '9b', 'uint'),
elem('ReferenceBlock*', 'fb', 'sint'),
+ elem('DiscardPadding', '75A2', 'sint'),
}),
elem('SimpleBlock*', 'a3', 'binary'),
}),
@@ -256,6 +257,8 @@ sub define_matroska {
elem('CodecPrivate', '63a2', 'binary'),
elem('CodecName', '258688', 'str'),
elem('CodecDecodeAll', 'aa', 'uint'),
+ elem('CodecDelay', '56AA', 'uint'),
+ elem('SeekPreRoll', '56BB', 'uint'),
elem('Video', 'e0', {
elem('FlagInterlaced', '9a', 'uint'),
elem('PixelWidth', 'b0', 'uint'),