[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 10 00:14:47 CEST 2010


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

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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20100510/7d79cd42/attachment.pgp>



More information about the ffmpeg-devel mailing list