[FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place
Soft Works
softworkz at hotmail.com
Wed Sep 29 00:25:12 EEST 2021
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> James Almer
> Sent: Tuesday, 28 September 2021 22:08
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure
> frames are writable when processing in-place
>
> On 9/28/2021 4:54 PM, Soft Works wrote:
> > Signed-off-by: softworkz <softworkz at hotmail.com>
> > ---
> > v2: Reduced to cases without AVFILTERPAD_FLAG_NEEDS_WRITABLE
>
> Can't this flag used in these filters?
I mentioned before that I don’t consider this as a good API
design. It had even caused a review of my subtitle filters to
assume that my filter code would be incorrect, even though I
had been using that flag.
It provides no other benefit than that it saves you from writing
two or three lines of code. Minus the one required to specify
the flag makes just one or two lines left.
Much higher than the benefit is the cost that is involved:
Filtering code (filter_frame) is no longer 1:1 exchangeable
between filters (in case of only one having that flag).
In order not to make mistakes, a developer needs to be aware
of that little specific detail, and even when he is, he might
still forget about it at times.
The ffmpeg filtering implementation is not overly complex, especially
when comparing to a similar (but much more capable) framework like
DirectShow.
But it's those little unexpected specifics like
AVFILTERPAD_FLAG_NEEDS_WRITABLE which are making it less easily
accessible than it could be.
Kind regards,
softworkz
More information about the ffmpeg-devel
mailing list