[FFmpeg-cvslog] lavfi: add attribute_align_arg to all public entry points

Hendrik Leppkes git at videolan.org
Fri Jul 26 14:05:24 CEST 2013


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Jul 26 10:31:05 2013 +0200| [af2a196e669cf7f00735a1df5889db35f3be87eb] | committer: Michael Niedermayer

lavfi: add attribute_align_arg to all public entry points

Previously it was partly only added to central functions called
internally, however if GCC would inline these into the public fuction, the
alignment attribute would not take effect.

Instead, add it to all public entry points to avoid these problems.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af2a196e669cf7f00735a1df5889db35f3be87eb
---

 libavfilter/buffersink.c |   16 ++++++++--------
 libavfilter/buffersrc.c  |   10 +++++-----
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index bd07c58..8eb31ae 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -118,7 +118,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
     return 0;
 }
 
-int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
+int attribute_align_arg av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
 {
     return av_buffersink_get_frame_flags(ctx, frame, 0);
 }
@@ -272,8 +272,8 @@ static void compat_free_buffer(AVFilterBuffer *buf)
     av_free(buf);
 }
 
-static int attribute_align_arg compat_read(AVFilterContext *ctx,
-                                           AVFilterBufferRef **pbuf, int nb_samples, int flags)
+static int compat_read(AVFilterContext *ctx,
+                       AVFilterBufferRef **pbuf, int nb_samples, int flags)
 {
     AVFilterBufferRef *buf;
     AVFrame *frame;
@@ -326,19 +326,19 @@ fail:
     return ret;
 }
 
-int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
+int attribute_align_arg av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
 {
     return compat_read(ctx, buf, 0, 0);
 }
 
-int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
-                               int nb_samples)
+int attribute_align_arg av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
+                                                   int nb_samples)
 {
     return compat_read(ctx, buf, nb_samples, 0);
 }
 
-int av_buffersink_get_buffer_ref(AVFilterContext *ctx,
-                                  AVFilterBufferRef **bufref, int flags)
+int attribute_align_arg av_buffersink_get_buffer_ref(AVFilterContext *ctx,
+                                                     AVFilterBufferRef **bufref, int flags)
 {
     *bufref = NULL;
 
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index b152779..a9174b8 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -77,13 +77,13 @@ typedef struct {
         return AVERROR(EINVAL);\
     }
 
-int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
+int attribute_align_arg av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
 {
     return av_buffersrc_add_frame_flags(ctx, (AVFrame *)frame,
                                         AV_BUFFERSRC_FLAG_KEEP_REF);
 }
 
-int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
+int attribute_align_arg av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
 {
     return av_buffersrc_add_frame_flags(ctx, frame, 0);
 }
@@ -91,7 +91,7 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
 static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
                                            AVFrame *frame, int flags);
 
-int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
+int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
 {
     AVFrame *copy = NULL;
     int ret = 0;
@@ -115,8 +115,8 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags
     return ret;
 }
 
-static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx,
-                                                               AVFrame *frame, int flags)
+static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
+                                           AVFrame *frame, int flags)
 {
     BufferSourceContext *s = ctx->priv;
     AVFrame *copy;



More information about the ffmpeg-cvslog mailing list