OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6266c51
)
Use av_fast_malloc instead of av_fast_realloc.
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 07:58:38 +0000
(09:58 +0200)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 07:58:38 +0000
(09:58 +0200)
Avoids a memleak, is less code and might be faster.
libavcodec/svq3.c
patch
|
blob
|
history
diff --git
a/libavcodec/svq3.c
b/libavcodec/svq3.c
index
7516606
..
a7e8065
100644
(file)
--- a/
libavcodec/svq3.c
+++ b/
libavcodec/svq3.c
@@
-949,8
+949,8
@@
static int svq3_decode_frame(AVCodecContext *avctx,
s->mb_x = s->mb_y = h->mb_xy = 0;
if (svq3->watermark_key) {
-
svq3->buf = av_fast_realloc(
svq3->buf, &svq3->buf_size,
-
buf_size+FF_INPUT_BUFFER_PADDING_SIZE);
+
av_fast_malloc(&
svq3->buf, &svq3->buf_size,
+ buf_size+FF_INPUT_BUFFER_PADDING_SIZE);
if (!svq3->buf)
return AVERROR(ENOMEM);
memcpy(svq3->buf, avpkt->data, buf_size);