[FFmpeg-devel] [PATCH 3/3] avfilter/allfilters: Don't cast const away

Zhao Zhili quinkblack at foxmail.com
Sun Aug 23 18:31:45 EEST 2020



> On Aug 23, 2020, at 4:51 PM, Andreas Rheinhardt <andreas.rheinhardt at gmail.com> wrote:
> 
> Zhao Zhili:
>> 
>>> On Aug 23, 2020, at 7:04 AM, Andreas Rheinhardt <andreas.rheinhardt at gmail.com> wrote:
>>> 
>>> Casting const away directly before return is completely pointless
>>> here as avfilter_get_by_name() already returns a const AVFilter *.
>>> 
>>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>>> ---
>>> libavfilter/allfilters.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
>>> index 3f70153986..fa91e608e4 100644
>>> --- a/libavfilter/allfilters.c
>>> +++ b/libavfilter/allfilters.c
>>> @@ -528,7 +528,7 @@ const AVFilter *avfilter_get_by_name(const char *name)
>>> 
>>>    while ((f = av_filter_iterate(&opaque)))
>>>        if (!strcmp(f->name, name))
>>> -            return (AVFilter *)f;
>>> +            return f;
>>> 
>> 
>> I have a same patch long time ago.
>> 
>> http://ffmpeg.org/pipermail/ffmpeg-devel/2019-October/252193.html <http://ffmpeg.org/pipermail/ffmpeg-devel/2019-October/252193.html> <http://ffmpeg.org/pipermail/ffmpeg-devel/2019-October/252193.html <http://ffmpeg.org/pipermail/ffmpeg-devel/2019-October/252193.html>>
>> 
> I applied your patch (as 26f81e5e83a015578c4c0c1d121a5e5f6c72bf8a).

Thank you. Current review process is easy to lost track.

> 
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org <mailto:ffmpeg-devel at ffmpeg.org>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org <mailto:ffmpeg-devel-request at ffmpeg.org> with subject "unsubscribe".



More information about the ffmpeg-devel mailing list