James Almer: > On 6/15/2021 8:31 PM, Andreas Rheinhardt wrote: >> by setting the FF_FMT_INIT_CLEANUP flag. >> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> >> --- >> libavformat/av1dec.c | 13 ++++--------- >> 1 file changed, 4 insertions(+), 9 deletions(-) >> >> diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c >> index 8ca804c2a3..f282477ca4 100644 >> --- a/libavformat/av1dec.c >> +++ b/libavformat/av1dec.c >> @@ -77,17 +77,10 @@ static int read_header(AVFormatContext *s, const >> AVRational *framerate, AVBSFCon >> return ret; >> ret = avcodec_parameters_copy((*bsf)->par_in, st->codecpar); >> - if (ret < 0) { >> - av_bsf_free(bsf); >> - return ret; >> - } >> - >> - ret = av_bsf_init(*bsf); >> if (ret < 0) >> - av_bsf_free(bsf); >> - >> - return ret; >> + return ret; >> + return av_bsf_init(*bsf); > > nit: I'd prefer if you keep the two ret < 0 checks with their > corresponding return rets, and make the last line an explicit return 0 > (For whatever reason, av_bsf_init() doxy does not mention what values it > returns). >
Will apply the patchset with this change. - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".