aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-03-14 19:27:14 +0100
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-03-15 10:30:51 +0100
commit31fe3c4d23aab8b43614b1ea825603080775677e (patch)
treebe8b4f2fc39fb18e9658968c0a9ee98c465784a4
parenta68d4bf2356b70a1cc5035822ee35d5499437ab2 (diff)
downloadffmpeg-31fe3c4d23aab8b43614b1ea825603080775677e.tar.gz
lavc/mediacodec: fix codec_name leak
-rw-r--r--libavcodec/mediacodecdec.c2
-rw-r--r--libavcodec/mediacodecdec.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index bd10ff7264..41b009abf0 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 bf23f859d9..36fdbf54fe 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;