[FFmpeg-devel] [PATCH] support 16k nellymoser in flv demuxer

Thierry Foucu tfoucu
Tue Nov 2 21:08:06 CET 2010


$Subject

Index: libavformat/flv.h
===================================================================
--- libavformat/flv.h (revision 25649)
+++ libavformat/flv.h (working copy)
@@ -75,6 +75,7 @@
     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,
Index: libavformat/flvdec.c
===================================================================
--- libavformat/flvdec.c (revision 25649)
+++ libavformat/flvdec.c (working copy)
@@ -68,6 +68,12 @@
         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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flv_16knellymoser.patch
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101102/80ff7750/attachment.bin>



More information about the ffmpeg-devel mailing list