"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/libopusdec.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

libopusdec.c  (libav-12):libopusdec.c  (libav-12.1)
skipping to change at line 45 skipping to change at line 45
}; };
#define OPUS_HEAD_SIZE 19 #define OPUS_HEAD_SIZE 19
static av_cold int libopus_decode_init(AVCodecContext *avc) static av_cold int libopus_decode_init(AVCodecContext *avc)
{ {
struct libopus_context *opus = avc->priv_data; struct libopus_context *opus = avc->priv_data;
int ret, channel_map = 0, gain_db = 0, nb_streams, nb_coupled; int ret, channel_map = 0, gain_db = 0, nb_streams, nb_coupled;
uint8_t mapping_arr[8] = { 0, 1 }, *mapping; uint8_t mapping_arr[8] = { 0, 1 }, *mapping;
if (avc->channels <= 0) {
av_log(avc, AV_LOG_WARNING,
"Invalid number of channels %d, defaulting to stereo\n", avc->cha
nnels);
avc->channels = 2;
}
avc->sample_rate = 48000; avc->sample_rate = 48000;
avc->sample_fmt = avc->request_sample_fmt == AV_SAMPLE_FMT_FLT ? avc->sample_fmt = avc->request_sample_fmt == AV_SAMPLE_FMT_FLT ?
AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16; AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
avc->channel_layout = avc->channels > 8 ? 0 : avc->channel_layout = avc->channels > 8 ? 0 :
ff_vorbis_channel_layouts[avc->channels - 1]; ff_vorbis_channel_layouts[avc->channels - 1];
if (avc->extradata_size >= OPUS_HEAD_SIZE) { if (avc->extradata_size >= OPUS_HEAD_SIZE) {
gain_db = sign_extend(AV_RL16(avc->extradata + 16), 16); gain_db = sign_extend(AV_RL16(avc->extradata + 16), 16);
channel_map = AV_RL8 (avc->extradata + 18); channel_map = AV_RL8 (avc->extradata + 18);
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS