diff options
author | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2017-02-08 12:51:37 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-02-15 11:21:11 +0100 |
commit | 0539d84d985e811e5989ef27c13f7e2dda0f9b89 (patch) | |
tree | 5a2dc172240dcf0dbae104e16b23352868928144 /libavformat/riffdec.c | |
parent | 871b4f3654636ed64560e86b9faa33828d195ceb (diff) | |
download | ffmpeg-0539d84d985e811e5989ef27c13f7e2dda0f9b89.tar.gz |
asfdec: Account for different Format Data sizes
Some muxers may use the BMP_HEADER Format Data size instead
of the ASF-specific one.
Bug-Id: 1020
CC: libav-stable@libav.org
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/riffdec.c')
-rw-r--r-- | libavformat/riffdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index 81248355e3..db83b3205a 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -180,10 +180,12 @@ enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps) return id; } -int ff_get_bmp_header(AVIOContext *pb, AVStream *st) +int ff_get_bmp_header(AVIOContext *pb, AVStream *st, uint32_t *size) { int tag1; - avio_rl32(pb); /* size */ + uint32_t size_ = avio_rl32(pb); + if (size) + *size = size_; st->codecpar->width = avio_rl32(pb); st->codecpar->height = (int32_t)avio_rl32(pb); avio_rl16(pb); /* planes */ |