mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
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>
This commit is contained in:
parent
5935513c0e
commit
ccb8f67499
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user