From 14e558024642638085ae2bbeffc6087612e6a3f9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 27 Jul 2015 11:13:53 +0200 Subject: opusdec: properly handle mismatching configurations in multichannel streams The substreams can have different resampling delays, so an additional level of buffering is needed to synchronize them. Bug-Id: 876 --- libavcodec/opus.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavcodec/opus.h') diff --git a/libavcodec/opus.h b/libavcodec/opus.h index 94993d623e..55c91fa012 100644 --- a/libavcodec/opus.h +++ b/libavcodec/opus.h @@ -173,6 +173,16 @@ typedef struct ChannelMap { typedef struct OpusContext { OpusStreamContext *streams; + + /* current output buffers for each streams */ + float **out; + int *out_size; + /* Buffers for synchronizing the streams when they have different + * resampling delays */ + AVAudioFifo **sync_buffers; + /* number of decoded samples for each stream */ + int *decoded_samples; + int nb_streams; int nb_stereo_streams; -- cgit v1.2.3