[FFmpeg-cvslog] r25667 - in trunk/libavformat: flv.h flvdec.c

cehoyos subversion
Wed Nov 3 21:12:07 CET 2010


Author: cehoyos
Date: Wed Nov  3 21:12:07 2010
New Revision: 25667

Log:
Fix 16kHz Mono NellyMoser in flv.

Patch by Thierry Foucu, tfoucu gmail

Modified:
   trunk/libavformat/flv.h
   trunk/libavformat/flvdec.c

Modified: trunk/libavformat/flv.h
==============================================================================
--- trunk/libavformat/flv.h	Wed Nov  3 20:44:00 2010	(r25666)
+++ trunk/libavformat/flv.h	Wed Nov  3 21:12:07 2010	(r25667)
@@ -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,

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	Wed Nov  3 20:44:00 2010	(r25666)
+++ trunk/libavformat/flvdec.c	Wed Nov  3 21:12:07 2010	(r25667)
@@ -68,6 +68,12 @@ static void flv_set_audio_codec(AVFormat
         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;



More information about the ffmpeg-cvslog mailing list