[FFmpeg-devel] [PATCH 11/13] Make nut muxer try to get the codec id from ff_raw_pixelFormatTags if ff_codec_get_id() cannot find it.

Stefano Sabatini stefano.sabatini-lala
Sat May 15 16:43:31 CEST 2010


On date Monday 2010-05-10 00:14:47 +0200, Michael Niedermayer encoded:
> On Sun, May 09, 2010 at 04:29:29PM +0200, Stefano Sabatini wrote:
> > This allows the muxer to use the Nut rawvideo pixel formats codec tags
> > specified in ff_raw_pixelFormatTags.
> > ---
> >  libavformat/nutdec.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
> > index 522affb..c480b9e 100644
> > --- a/libavformat/nutdec.c
> > +++ b/libavformat/nutdec.c
> > @@ -21,6 +21,7 @@
> >   */
> >  
> >  #include <strings.h>
> > +#include "libavcodec/internal.h"
> >  #include "libavutil/avstring.h"
> >  #include "libavutil/bswap.h"
> >  #include "libavutil/tree.h"
> > @@ -317,6 +318,9 @@ static int decode_stream_header(NUTContext *nut){
> >          case 0:
> >              st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
> >              st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp);
> > +            if (!st->codec->codec_id &&
> > +                ff_get_pix_fmt_from_codec_tag(ff_raw_pixelFormatTags, tmp) != PIX_FMT_NONE)
> > +                st->codec->codec_id = CODEC_ID_RAWVIDEO;
> 
> the codec tag/id mapping must be in AVOutputFormat.codec_tag

Yes but what about codec tag/pix_fmt mapping?

Regards.
-- 
FFmpeg = Fierce and Fascinating Minimal Pitiful Exciting Ghost



More information about the ffmpeg-devel mailing list