From 4e87ac823108a670a1a0c5f67ab9bcd6980bac33 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 3 Nov 2014 20:00:34 +0100 Subject: 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). --- demux/packet.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demux/packet.h') diff --git a/demux/packet.h b/demux/packet.h index 9c4e560e05..4bd724aa93 100644 --- a/demux/packet.h +++ b/demux/packet.h @@ -44,4 +44,6 @@ void demux_packet_shorten(struct demux_packet *dp, size_t len); void free_demux_packet(struct demux_packet *dp); struct demux_packet *demux_copy_packet(struct demux_packet *dp); +int demux_packet_set_padding(struct demux_packet *dp, int start, int end); + #endif /* MPLAYER_DEMUX_PACKET_H */ -- cgit v1.2.3