[SCM] libav/experimental: Fix 16kHz Mono NellyMoser in flv.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:18:36 UTC 2013
The following commit has been merged in the experimental branch:
commit caa7ad5dc68a9b287a49f1d34f557274d3feee9c
Author: Thierry Foucu <tfoucu at gmail.com>
Date: Wed Nov 3 20:12:07 2010 +0000
Fix 16kHz Mono NellyMoser in flv.
Patch by Thierry Foucu, tfoucu gmail
Originally committed as revision 25667 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/flv.h b/libavformat/flv.h
index 55266a1..5d2666d 100644
--- a/libavformat/flv.h
+++ b/libavformat/flv.h
@@ -75,6 +75,7 @@ enum {
FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET,
+ FLV_CODECID_NELLYMOSER_16KHZ_MONO = 4 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_NELLYMOSER_8KHZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_AAC = 10<< FLV_AUDIO_CODECID_OFFSET,
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 063f906..b359261 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -68,6 +68,12 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
case FLV_CODECID_MP3 : acodec->codec_id = CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break;
case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate
+ acodec->codec_id = CODEC_ID_NELLYMOSER;
+ break;
+ case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
+ acodec->sample_rate = 16000;
+ acodec->codec_id = CODEC_ID_NELLYMOSER;
+ break;
case FLV_CODECID_NELLYMOSER:
acodec->codec_id = CODEC_ID_NELLYMOSER;
break;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list