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

Michael Niedermayer michaelni
Tue Nov 2 22:49:01 CET 2010


On Tue, Nov 02, 2010 at 01:54:56PM -0700, Thierry Foucu wrote:
> On Tue, Nov 2, 2010 at 1:50 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
> > On Tue, Nov 02, 2010 at 01:08:06PM -0700, Thierry Foucu wrote:
> > > $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;
> >
> > >  flv.h    |    1 +
> > >  flvdec.c |    6 ++++++
> > >  2 files changed, 7 insertions(+)
> > > ea23e5f1633860e05f869d7e107bc941431f193c  flv_16knellymoser.patch
> >
> > if shown to be needed for a file then ok
> >
> >
> Tag id 0x4 is part of the FLV spec i have. And since ffmpeg seems to support
> 16k mono nellymoser, it does make sens to at least detect the audio codec
> correctly.

if the spec says so then its ok of course (ive not checked)

    [...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101102/339bce42/attachment.pgp>



More information about the ffmpeg-devel mailing list