aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/riff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-31 00:46:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-31 00:46:02 +0200
commit76853a3e0ce4d4ef09ffcca7307991b8db832cd4 (patch)
treea2a73b931a7391246ba02de38546e9b3fc83b840 /libavformat/riff.c
parenta1fc1d2e1b4a5bcfd07549dce9735f24237aa32e (diff)
downloadffmpeg-76853a3e0ce4d4ef09ffcca7307991b8db832cd4.tar.gz
libavformat: ff_get_bmp_header: return esize too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r--libavformat/riff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index add8440429..1266f8b3b6 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -653,10 +653,11 @@ enum CodecID 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, unsigned *esize)
{
int tag1;
- avio_rl32(pb); /* size */
+ if(esize) *esize = avio_rl32(pb);
+ else avio_rl32(pb);
st->codec->width = avio_rl32(pb);
st->codec->height = (int32_t)avio_rl32(pb);
avio_rl16(pb); /* planes */