Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
DASHContext *c = s->priv_data;
int ret = 0;
int close_in = 0;
DASHContext *c = s->priv_data;
int ret = 0;
int close_in = 0;
- uint8_t *new_url = NULL;
int64_t filesize = 0;
AVBPrint buf;
AVDictionary *opts = NULL;
int64_t filesize = 0;
AVBPrint buf;
AVDictionary *opts = NULL;
- if (av_opt_get(in, "location", AV_OPT_SEARCH_CHILDREN, &new_url) >= 0) {
- c->base_url = av_strdup(new_url);
- } else {
+ if (av_opt_get(in, "location", AV_OPT_SEARCH_CHILDREN, (uint8_t**)&c->base_url) < 0)
c->base_url = av_strdup(url);
c->base_url = av_strdup(url);
filesize = avio_size(in);
filesize = filesize > 0 ? filesize : DEFAULT_MANIFEST_SIZE;
filesize = avio_size(in);
filesize = filesize > 0 ? filesize : DEFAULT_MANIFEST_SIZE;
xmlFreeNode(mpd_baseurl_node);
}
xmlFreeNode(mpd_baseurl_node);
}
av_bprint_finalize(&buf, NULL);
if (close_in) {
avio_close(in);
av_bprint_finalize(&buf, NULL);
if (close_in) {
avio_close(in);