From 85afb6ea6fabddbf3c3ba88a7e12318d8094caf2 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 29 Mar 2015 22:34:53 +0800 Subject: [PATCH] add donation. fix bug of adts. --- DONATIONS.txt | 1 + trunk/src/protocol/srs_raw_avc.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DONATIONS.txt b/DONATIONS.txt index dbec0d490..0803f82d6 100644 --- a/DONATIONS.txt +++ b/DONATIONS.txt @@ -13,6 +13,7 @@ RMB 500-999 * [2015-xx-xx xx:xx] xxx RMB 100-499 +* [2015-03-29 11-07] 姚伟斌 * [2015-03-14 20:21] 万伟 * [2015-03-11 09:44] 叶发养 * [2015-02-08 21:10] 韩友洪 diff --git a/trunk/src/protocol/srs_raw_avc.cpp b/trunk/src/protocol/srs_raw_avc.cpp index e25b6c5c7..d3efced03 100644 --- a/trunk/src/protocol/srs_raw_avc.cpp +++ b/trunk/src/protocol/srs_raw_avc.cpp @@ -438,6 +438,7 @@ int SrsRawAacStream::adts_demux(SrsStream* stream, char** pframe, int* pnb_frame codec.frame_length = frame_length; // @see srs_audio_write_raw_frame(). + // TODO: FIXME: maybe need to resample audio. codec.sound_format = 10; // AAC if (sampling_frequency_index <= 0x0c && sampling_frequency_index > 0x0a) { codec.sound_rate = SrsCodecAudioSampleRate5512; @@ -451,7 +452,7 @@ int SrsRawAacStream::adts_demux(SrsStream* stream, char** pframe, int* pnb_frame codec.sound_rate = SrsCodecAudioSampleRate44100; srs_warn("adts invalid sample rate for flv, rate=%#x", sampling_frequency_index); } - codec.sound_size = srs_max(0, srs_min(1, channel_configuration - 1)); + codec.sound_type = srs_max(0, srs_min(1, channel_configuration - 1)); // TODO: FIXME: finger it out the sound size by adts. codec.sound_size = 1; // 0(8bits) or 1(16bits).