diff --git a/libavformat/nut.c b/libavformat/nut.c index 01e0501a4b..b148a78db8 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -31,6 +31,39 @@ const AVCodecTag ff_nut_subtitle_tags[] = { { CODEC_ID_NONE , 0 } }; +const AVCodecTag ff_nut_video_tags[] = { + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') }, + { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') }, + { CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) }, + { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') }, + { CODEC_ID_NONE , 0 } +}; + void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ int i; for(i=0; iavf->nb_streams; i++){ diff --git a/libavformat/nut.h b/libavformat/nut.h index ce052dfedf..7013fb126a 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -99,6 +99,7 @@ typedef struct { } NUTContext; extern const AVCodecTag ff_nut_subtitle_tags[]; +extern const AVCodecTag ff_nut_video_tags[]; typedef struct { char str[9]; diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 5d5cd557b3..293f67ddc3 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -924,5 +924,6 @@ AVInputFormat nut_demuxer = { read_seek, .extensions = "nut", .metadata_conv = ff_nut_metadata_conv, + .codec_tag = (const AVCodecTag * const []) { ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, }; #endif diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index b076eb19d9..469672bc41 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -824,6 +824,6 @@ AVOutputFormat nut_muxer = { write_packet, write_trailer, .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, - .codec_tag= (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0}, + .codec_tag = (const AVCodecTag * const []){ ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, .metadata_conv = ff_nut_metadata_conv, };