[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.

Michael Niedermayer michaelni
Mon May 17 01:15:26 CEST 2010


On Sat, May 15, 2010 at 04:43:31PM +0200, Stefano Sabatini wrote:
> 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?

the pixel format is more or less a decoder output property
and an encoder input property
its not really a demuxer level property.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/83c9bc40/attachment.pgp>



More information about the ffmpeg-devel mailing list