diff options
author | Marth64 <marth64@proxyid.net> | 2024-10-11 02:06:35 -0500 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2024-10-13 23:03:15 +0800 |
commit | 6ee7555a909d263080de8490628e92bf0c5cdb15 (patch) | |
tree | f1f55b80f1e540ac8b40b1448a9eebb231843648 | |
parent | e6e9cb3ce74b48bd0f93f54df84440c4d6266c4d (diff) | |
download | ffmpeg-6ee7555a909d263080de8490628e92bf0c5cdb15.tar.gz |
avformat/dashdec: return ret directly in open_demux_for_component()
Signed-off-by: Marth64 <marth64@proxyid.net>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
-rw-r--r-- | libavformat/dashdec.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 99ac6197be..9ce23aec65 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1939,16 +1939,15 @@ static int open_demux_for_component(AVFormatContext *s, struct representation *p } ret = reopen_demux_for_component(s, pls); - if (ret < 0) { - goto fail; - } + if (ret < 0) + return ret; + for (i = 0; i < pls->ctx->nb_streams; i++) { AVStream *st = avformat_new_stream(s, NULL); AVStream *ist = pls->ctx->streams[i]; - if (!st) { - ret = AVERROR(ENOMEM); - goto fail; - } + if (!st) + return AVERROR(ENOMEM); + st->id = i; avcodec_parameters_copy(st->codecpar, ist->codecpar); avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den); @@ -1958,8 +1957,6 @@ static int open_demux_for_component(AVFormatContext *s, struct representation *p } return 0; -fail: - return ret; } static int is_common_init_section_exist(struct representation **pls, int n_pls) |