]> git.sesse.net Git - vlc/commit
Opus demuxing fixes.
authorTimothy B. Terriberry <tterribe@xiph.org>
Sun, 2 Sep 2012 14:36:44 +0000 (07:36 -0700)
committerRafaël Carré <funman@videolan.org>
Mon, 3 Sep 2012 21:22:40 +0000 (23:22 +0200)
commit675072a8a6a520f79e9892e26ff3be98b069df7a
tree3870051335883514d448958db27b0d7dfe147bb3
parentc33e5f1920a6782e60b3fc38235f90edca52eeb0
Opus demuxing fixes.

This properly handles pre-skip, seeking pre-roll, and end-trim. It
uses the i_nb_samples field of block_t to signal to the decoder how
many samples should be returned after (possibly) skipping some at
the start of the block (for both pre-skip and pre-roll). In
addition, it abuses the i_length field of block_t to signal to the
decoder how many samples to trim from the end of the packet (for
end-trimming).

This patch does not compute correct timestamps for streams which
start at a non-zero offset (e.g., live streams joined in the
middle), nor does it correctly compute the length of a stream. But
neither of those things work for Vorbis, either. I'm leaving them
for a follow-up patch.

Signed-off-by: Rafaël Carré <funman@videolan.org>
modules/demux/ogg.c
modules/demux/ogg.h
modules/demux/oggseek.c