diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-15 04:37:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-15 04:50:06 +0200 |
commit | 85b21147594101ba2d8e7ea2cfa504c0d1baee5a (patch) | |
tree | 62927788e459965cea1ff4cd23c219fcf0410b0e /libavformat/wav.c | |
parent | 256c5b08bf09cb6403790d731cc1c771d8fb0e94 (diff) | |
parent | a3a0af4fb1237bed0af75868073f9a63db8b1864 (diff) | |
download | ffmpeg-85b21147594101ba2d8e7ea2cfa504c0d1baee5a.tar.gz |
Merge commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864'
* commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864':
avutil: make aes and sha api public
handle malloc failures in ff_get_wav_header
add xWMA demuxer
mpegts: force the default timebase
libavcodec: Bump micro after adding the dtx AVOptions
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r-- | libavformat/wav.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index afdd70114e..588aff512b 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -195,6 +195,7 @@ static int wav_read_header(AVFormatContext *s, AVIOContext *pb = s->pb; AVStream *st; WAVContext *wav = s->priv_data; + int ret; /* check RIFF header */ tag = avio_rl32(pb); @@ -227,7 +228,9 @@ static int wav_read_header(AVFormatContext *s, if (!st) return AVERROR(ENOMEM); - ff_get_wav_header(pb, st->codec, size); + ret = ff_get_wav_header(pb, st->codec, size); + if (ret < 0) + return ret; st->need_parsing = AVSTREAM_PARSE_FULL; av_set_pts_info(st, 64, 1, st->codec->sample_rate); @@ -383,6 +386,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap) WAVContext *wav = s->priv_data; AVStream *st; uint8_t guid[16]; + int ret; avio_read(pb, guid, 16); if (memcmp(guid, guid_riff, 16)) @@ -408,7 +412,9 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap) return AVERROR(ENOMEM); /* subtract chunk header size - normal wav file doesn't count it */ - ff_get_wav_header(pb, st->codec, size - 24); + ret = ff_get_wav_header(pb, st->codec, size - 24); + if (ret < 0) + return ret; avio_skip(pb, FFALIGN(size, INT64_C(8)) - size); st->need_parsing = AVSTREAM_PARSE_FULL; |