[FFmpeg-cvslog] lavc/mediacodec: fix codec_name leak
Matthieu Bouron
git at videolan.org
Tue Mar 15 10:36:35 CET 2016
ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at stupeflix.com> | Mon Mar 14 19:27:14 2016 +0100| [31fe3c4d23aab8b43614b1ea825603080775677e] | committer: Matthieu Bouron
lavc/mediacodec: fix codec_name leak
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31fe3c4d23aab8b43614b1ea825603080775677e
---
libavcodec/mediacodecdec.c | 2 ++
libavcodec/mediacodecdec.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index bd10ff7..41b009a 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -566,5 +566,7 @@ int ff_mediacodec_dec_close(AVCodecContext *avctx, MediaCodecDecContext *s)
s->format = NULL;
}
+ av_freep(&s->codec_name);
+
return 0;
}
diff --git a/libavcodec/mediacodecdec.h b/libavcodec/mediacodecdec.h
index bf23f85..36fdbf5 100644
--- a/libavcodec/mediacodecdec.h
+++ b/libavcodec/mediacodecdec.h
@@ -34,7 +34,7 @@
typedef struct MediaCodecDecContext {
- const char *codec_name;
+ char *codec_name;
FFAMediaCodec *codec;
FFAMediaFormat *format;
More information about the ffmpeg-cvslog
mailing list