summaryrefslogtreecommitdiff
path: root/libavformat/webm_chunk.c
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2015-04-30 12:56:24 -0700
committerMichael Niedermayer <michaelni@gmx.at>2015-04-30 23:33:10 +0200
commitccb8f674995ded871ac725833b5efefce0ad63de (patch)
treefe39ccccbf4993187e4047733b225f09836cec47 /libavformat/webm_chunk.c
parent5935513c0ed1563a654b2e40d053f824bae93e6b (diff)
downloadffmpeg-ccb8f674995ded871ac725833b5efefce0ad63de.tar.gz
lavf/webm_chunk: Fix a memory leak.
Fix a duplicate memory allocation. priv_data should be allocated in line 64 call to avformat_alloc_output_context2 since we pass the correct AVFormat to it. This removes the duplicate allocation. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/webm_chunk.c')
-rw-r--r--libavformat/webm_chunk.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
index 8e032703fc..c7cc0b8ff3 100644
--- a/libavformat/webm_chunk.c
+++ b/libavformat/webm_chunk.c
@@ -70,11 +70,6 @@ static int chunk_mux_init(AVFormatContext *s)
oc->max_delay = s->max_delay;
av_dict_copy(&oc->metadata, s->metadata, 0);
- oc->priv_data = av_mallocz(oc->oformat->priv_data_size);
- if (!oc->priv_data) {
- avio_close(oc->pb);
- return AVERROR(ENOMEM);
- }
*(const AVClass**)oc->priv_data = oc->oformat->priv_class;
av_opt_set_defaults(oc->priv_data);
av_opt_set_int(oc->priv_data, "dash", 1, 0);