[FFmpeg-devel] [PATCH 1/3] avformat/dashdec: return ret directly in open_demux_for_component()
Steven Liu
lingjiujianke at gmail.com
Sun Oct 13 18:10:55 EEST 2024
Steven Liu <lingjiujianke at gmail.com> 于2024年10月12日周六 09:21写道:
>
> Marth64 <marth64 at proxyid.net> 于2024年10月11日周五 15:06写道:
> >
> > Signed-off-by: Marth64 <marth64 at proxyid.net>
> > ---
> > libavformat/dashdec.c | 15 ++++++---------
> > 1 file 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)
> > --
> > 2.34.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
> LGTM
Patchset pushed,
Thanks
Steven
More information about the ffmpeg-devel
mailing list