[FFmpeg-devel] [PATCH 8/9] avfilter/vf_subtitles: Return early upon avformat_open_input() failure

Paul B Mahol onemda at gmail.com
Fri Sep 11 12:18:04 EEST 2020


On Thu, Sep 10, 2020 at 11:49:00PM +0200, Andreas Rheinhardt wrote:
> There is nothing to free at this point.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavfilter/vf_subtitles.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

probably ok

> 
> diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
> index 08b4d4efca..f9733c3935 100644
> --- a/libavfilter/vf_subtitles.c
> +++ b/libavfilter/vf_subtitles.c
> @@ -322,7 +322,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
>      ret = avformat_open_input(&fmt, ass->filename, NULL, NULL);
>      if (ret < 0) {
>          av_log(ctx, AV_LOG_ERROR, "Unable to open %s\n", ass->filename);
> -        goto end;
> +        return ret;
>      }
>      ret = avformat_find_stream_info(fmt, NULL);
>      if (ret < 0)
> -- 
> 2.20.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".


More information about the ffmpeg-devel mailing list