[FFmpeg-devel] [PATCH 1/7] avcodec: do not use AVFrame accessor

Aaron Levinson alevinsn at aracnet.com
Sat Apr 22 21:55:50 EEST 2017

On 4/22/2017 2:27 AM, wm4 wrote:
> On Sat, 22 Apr 2017 16:04:22 +0700
> Muhammad Faiz <mfcc64 at gmail.com> wrote:
>> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
>> ---
> +1 to patches 1-7. As long as the accessors only trivially access
> public fields, it's better (and less ugly) not to use accessors at all.

Then why have the accessors at all if the fields are public?  As far as 
I can tell, the benefit to using these accessors is that, if certain 
properties become internal in the future, or variable names change, or 
the structures become opaque, etc, the code will continue to work.

Aaron Levinson

More information about the ffmpeg-devel mailing list