projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d6233d
)
free subtitle_header before overwriting it to avoid memleak
author
Aurelien Jacobs
<aurel@gnuage.org>
Fri, 31 Dec 2010 00:06:25 +0000
(
00:06
+0000)
committer
Aurelien Jacobs
<aurel@gnuage.org>
Fri, 31 Dec 2010 00:06:25 +0000
(
00:06
+0000)
Originally committed as revision 26176 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index d82f5891818ae40c2b89b8e34ccfac1eb5fc0df4..ce7473587e035ae8e3181ccc11c0c513bbafa797 100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-505,6
+505,11
@@
int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
avcodec_set_dimensions(avctx, 0, 0);
}
+ /* if the decoder init function was already called previously,
+ free the already allocated subtitle_header before overwriting it */
+ if (codec->decode)
+ av_freep(&avctx->subtitle_header);
+
#define SANE_NB_CHANNELS 128U
if (avctx->channels > SANE_NB_CHANNELS) {
ret = AVERROR(EINVAL);