flvenc: Support muxing 16 kHz nellymoser
authorMartin Storsjö <martin@martin.st>
Thu, 15 Dec 2011 13:10:57 +0000 (15:10 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 15 Dec 2011 14:53:54 +0000 (16:53 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/flvenc.c

index dfa17e0..623bea7 100644 (file)
@@ -90,6 +90,7 @@ static int get_audio_flags(AVCodecContext *enc){
         case    11025:
             flags |= FLV_SAMPLERATE_11025HZ;
             break;
+        case    16000: //nellymoser only
         case     8000: //nellymoser only
         case     5512: //not mp3
             if(enc->codec_id != CODEC_ID_MP3){
@@ -125,6 +126,8 @@ static int get_audio_flags(AVCodecContext *enc){
     case CODEC_ID_NELLYMOSER:
         if (enc->sample_rate == 8000) {
             flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
+        } else if (enc->sample_rate == 16000) {
+            flags |= FLV_CODECID_NELLYMOSER_16KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
         } else {
             flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
         }