mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-31 00:47:44 +00:00
add ff_get_bmp_header
Originally committed as revision 26091 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
52654005ca
commit
456a70aeb8
3 changed files with 25 additions and 11 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue