diff mbox

[FFmpeg-devel] lavf/dashdec: Do not copy url on init copy

Message ID CAB0OVGr+QH5iNVbObRckb7Ose4S978r0uYCyjoVRXfEbKHhw0Q@mail.gmail.com
State Superseded
Headers show

Commit Message

Carl Eugen Hoyos July 31, 2018, 10:06 p.m. UTC
Hi!

Attached patch fixes ticket #7338, better fix welcome!

Please comment, Carl Eugen

Comments

Colin NG Aug. 3, 2018, 7:56 p.m. UTC | #1
How about having different memory location for init_section of each presentation?


    rep_dest->init_section = (struct fragment *) av_mallocz(sizeof(struct fragment));
diff mbox

Patch

From a967c8d11872d7163175ed946abdc80dcce8f37a Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 1 Aug 2018 00:04:32 +0200
Subject: [PATCH] lavf/dashdec: Do not copy url address on init copy.

Fixes ticket #7338.
---
 libavformat/dashdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 89f3ac2..12e7535 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1902,6 +1902,7 @@  static void copy_init_section(struct representation *rep_dest, struct representa
     *rep_dest->init_section = *rep_src->init_section;
     rep_dest->init_sec_buf = av_mallocz(rep_src->init_sec_buf_size);
     memcpy(rep_dest->init_sec_buf, rep_src->init_sec_buf, rep_src->init_sec_data_len);
+    rep_dest->init_section->url = NULL;
     rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size;
     rep_dest->init_sec_data_len = rep_src->init_sec_data_len;
     rep_dest->cur_timestamp = rep_src->cur_timestamp;
-- 
1.7.10.4