diff options
author | Peter Ross <pross@xvid.org> | 2010-12-26 01:23:44 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2010-12-26 01:23:44 +0000 |
commit | 456a70aeb826b7b84d30cc3cc279fa7c65fc7d4e (patch) | |
tree | ac69b659056201d3c9b68aca8c8228524c26ce77 /libavformat/riff.c | |
parent | 52654005caa343e9d17c0776d05825f1d771f448 (diff) | |
download | ffmpeg-456a70aeb826b7b84d30cc3cc279fa7c65fc7d4e.tar.gz |
add ff_get_bmp_header
Originally committed as revision 26091 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r-- | libavformat/riff.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index 0fb2fd6d9e..3d584a3779 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -440,6 +440,23 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc) return hdrsize; } +int ff_get_bmp_header(ByteIOContext *pb, AVStream *st) +{ + int tag1; + get_le32(pb); /* size */ + st->codec->width = get_le32(pb); + st->codec->height = (int32_t)get_le32(pb); + get_le16(pb); /* planes */ + st->codec->bits_per_coded_sample= get_le16(pb); /* depth */ + tag1 = get_le32(pb); + get_le32(pb); /* ImageSize */ + get_le32(pb); /* XPelsPerMeter */ + get_le32(pb); /* YPelsPerMeter */ + get_le32(pb); /* ClrUsed */ + get_le32(pb); /* ClrImportant */ + return tag1; +} + /* BITMAPINFOHEADER header */ void ff_put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf) { |