diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-12 22:49:20 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-12 23:01:12 +0400 |
commit | 9765caec1b9991e676d1b91db0c04a6242b65d7a (patch) | |
tree | dcd5a8d04e7c5a61aa12b455424fb4d0d9b2d076 /libavformat/smacker.c | |
parent | f0c64d0d0b16162a46d7b88d09ac0801a94e59a7 (diff) | |
parent | 826c56d16e55f3819a75d01f957dd295aa1e9f3a (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
adpcm: split ADPCM encoders and decoders into separate files.
doc/avconv: fix typo.
rv34: check that subsequent slices have the same type as first one.
smacker demuxer: handle possible av_realloc() failure.
lavfi: add split filter from soc.
lavfi: add showinfo filter
libxavs: add private options corresponding to deprecated global options
Conflicts:
Changelog
libavcodec/adpcm.c
libavfilter/avfilter.h
libavfilter/vf_showinfo.c
libavfilter/vf_split.c
libavformat/smacker.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r-- | libavformat/smacker.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index ba55946e43..347ee4e709 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -286,15 +286,16 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) for(i = 0; i < 7; i++) { if(flags & 1) { int size; + uint8_t *tmpbuf; + size = avio_rl32(s->pb) - 4; frame_size -= size; frame_size -= 4; smk->curstream++; - smk->bufs[smk->curstream] = av_realloc(smk->bufs[smk->curstream], size); - if (!smk->bufs[smk->curstream]) { - smk->buf_sizes[smk->curstream] = 0; + tmpbuf = av_realloc(smk->bufs[smk->curstream], size); + if (!tmpbuf) return AVERROR(ENOMEM); - } + smk->bufs[smk->curstream] = tmpbuf; smk->buf_sizes[smk->curstream] = size; ret = avio_read(s->pb, smk->bufs[smk->curstream], size); if(ret != size) |