[FFmpeg-devel] [PATCH 8/9] avfilter/vf_subtitles: Return early upon avformat_open_input() failure
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Fri Sep 11 13:20:49 EEST 2020
Nicolas George:
> Andreas Rheinhardt (12020-09-10):
>> 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(-)
>
> Does it help anything? If something gets allocated earlier, we will need
> to add it back. When there is a comprehensive cleanup label, using it
> always seems more robust than guessing if something needs freeing or
> not.
>
> Regards,
>
It avoids cleaning up three inexistent objects; I actually regarded this
as enough benefit to merit the change.
- Andreas
More information about the ffmpeg-devel
mailing list