Mercurial > libavformat.hg
changeset 89:8e3cf4e9fc5a libavformat
rawvideo patch by (Fred Rothganger <rothgang at uiuc dot edu>)
author | michaelni |
---|---|
date | Sun, 16 Mar 2003 21:03:20 +0000 |
parents | 70160a717f1b |
children | 27d6df9208d4 |
files | avformat.h avienc.c |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/avformat.h Wed Mar 12 18:57:33 2003 +0000 +++ b/avformat.h Sun Mar 16 21:03:20 2003 +0000 @@ -331,9 +331,6 @@ extern AVOutputFormat yuv4mpegpipe_oformat; /* utils.c */ -#define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24)) -#define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24)) - void av_register_input_format(AVInputFormat *format); void av_register_output_format(AVOutputFormat *format); AVOutputFormat *guess_stream_format(const char *short_name,
--- a/avienc.c Wed Mar 12 18:57:33 2003 +0000 +++ b/avienc.c Sun Mar 16 21:03:20 2003 +0000 @@ -89,6 +89,7 @@ { CODEC_ID_HUFFYUV, MKTAG('h', 'f', 'y', 'u') }, { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') }, { CODEC_ID_CYUV, MKTAG('c', 'y', 'u', 'v') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') }, { 0, 0 }, }; @@ -249,12 +250,17 @@ stream = &s->streams[i]->codec; + /* FourCC should really be set by the codec itself */ + if (! stream->codec_tag) { + stream->codec_tag = codec_get_bmp_tag(stream->codec_id); + } + /* stream generic header */ strh = start_tag(pb, "strh"); switch(stream->codec_type) { case CODEC_TYPE_VIDEO: put_tag(pb, "vids"); - put_le32(pb, codec_get_bmp_tag(stream->codec_id)); + put_le32(pb, stream->codec_tag); put_le32(pb, 0); /* flags */ put_le16(pb, 0); /* priority */ put_le16(pb, 0); /* language */