aboutsummaryrefslogtreecommitdiff
path: root/libavformat/smacker.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-09-27 12:13:41 +0200
committerMichael Niedermayer2013-09-27 12:13:41 +0200
commit72eddc10fa1f3ca7fb95292673fa26401f754c92 (patch)
tree878039cdab1f882bc68a9e60203e430d42eb8d54 /libavformat/smacker.c
parent328a5b93d3a493d6a653a83c425fb2cc98e8f41b (diff)
parentd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9 (diff)
Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9': lavf: Reset the entry count and allocation size variables on av_reallocp failures Conflicts: libavformat/avienc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r--libavformat/smacker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 0f52dc19e4..c5bc5e0e29 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -324,8 +324,10 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
frame_size -= size;
frame_size -= 4;
smk->curstream++;
- if ((err = av_reallocp(&smk->bufs[smk->curstream], size)) < 0)
+ if ((err = av_reallocp(&smk->bufs[smk->curstream], size)) < 0) {
+ smk->buf_sizes[smk->curstream] = 0;
return err;
+ }
smk->buf_sizes[smk->curstream] = size;
ret = avio_read(s->pb, smk->bufs[smk->curstream], size);
if(ret != size)