diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-05-11 15:23:44 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2019-05-14 17:36:19 +0800 |
commit | bf6e0f709be20f3aad6c6fe9b85411507bdf025c (patch) | |
tree | 00683125f29485a58174f994e56343a88117093e | |
parent | c663046b41057d0cec519e305e1cc4798ab3da50 (diff) | |
download | ffmpeg-bf6e0f709be20f3aad6c6fe9b85411507bdf025c.tar.gz |
lavf/dashdec: refactoring error handle logic for open_input
refactoring error handle logic for open_input.
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
-rw-r--r-- | libavformat/dashdec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index ce8bd4ad68..2c50f23c06 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1687,6 +1687,7 @@ static int open_input(DASHContext *c, struct representation *pls, struct fragmen url = av_mallocz(c->max_url_size); if (!url) { + ret = AVERROR(ENOMEM); goto cleanup; } @@ -1701,9 +1702,6 @@ static int open_input(DASHContext *c, struct representation *pls, struct fragmen av_log(pls->parent, AV_LOG_VERBOSE, "DASH request for url '%s', offset %"PRId64", playlist %d\n", url, seg->url_offset, pls->rep_idx); ret = open_url(pls->parent, &pls->input, url, c->avio_opts, opts, NULL); - if (ret < 0) { - goto cleanup; - } cleanup: av_free(url); |