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

Hendrik Leppkes git at videolan.org
Sat Jul 27 08:58:49 CEST 2013


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Jul 26 10:20:47 2013 +0200| [779e6c2b985f2ad461a1ae704160822f97709ba7] | committer: Martin Storsjö

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: Martin Storsjö <martin at martin.st>

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

 libavfilter/buffersink.c |    8 ++++----
 libavfilter/buffersrc.c  |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 94e7366..a6352a7 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -146,8 +146,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)
+static int compat_read(AVFilterContext *ctx,
+                       AVFilterBufferRef **pbuf, int nb_samples)
 {
     AVFilterBufferRef *buf;
     AVFrame *frame;
@@ -198,12 +198,12 @@ 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);
 }
 
-int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
+int attribute_align_arg av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
                                int nb_samples)
 {
     return compat_read(ctx, buf, nb_samples);
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 5e982ea..f11f835 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -73,7 +73,7 @@ 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)
 {
     AVFrame *copy;
     int ret = 0;



More information about the ffmpeg-cvslog mailing list