Browse code

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@gmx.at>

Hendrik Leppkes authored on 2013/07/26 17:31:05
Showing 2 changed files
... ...
@@ -118,7 +118,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
118 118
     return 0;
119 119
 }
120 120
 
121
-int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
121
+int attribute_align_arg av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
122 122
 {
123 123
     return av_buffersink_get_frame_flags(ctx, frame, 0);
124 124
 }
... ...
@@ -272,8 +272,8 @@ static void compat_free_buffer(AVFilterBuffer *buf)
272 272
     av_free(buf);
273 273
 }
274 274
 
275
-static int attribute_align_arg compat_read(AVFilterContext *ctx,
276
-                                           AVFilterBufferRef **pbuf, int nb_samples, int flags)
275
+static int compat_read(AVFilterContext *ctx,
276
+                       AVFilterBufferRef **pbuf, int nb_samples, int flags)
277 277
 {
278 278
     AVFilterBufferRef *buf;
279 279
     AVFrame *frame;
... ...
@@ -326,19 +326,19 @@ fail:
326 326
     return ret;
327 327
 }
328 328
 
329
-int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
329
+int attribute_align_arg av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
330 330
 {
331 331
     return compat_read(ctx, buf, 0, 0);
332 332
 }
333 333
 
334
-int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
335
-                               int nb_samples)
334
+int attribute_align_arg av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
335
+                                                   int nb_samples)
336 336
 {
337 337
     return compat_read(ctx, buf, nb_samples, 0);
338 338
 }
339 339
 
340
-int av_buffersink_get_buffer_ref(AVFilterContext *ctx,
341
-                                  AVFilterBufferRef **bufref, int flags)
340
+int attribute_align_arg av_buffersink_get_buffer_ref(AVFilterContext *ctx,
341
+                                                     AVFilterBufferRef **bufref, int flags)
342 342
 {
343 343
     *bufref = NULL;
344 344
 
... ...
@@ -77,13 +77,13 @@ typedef struct {
77 77
         return AVERROR(EINVAL);\
78 78
     }
79 79
 
80
-int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
80
+int attribute_align_arg av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
81 81
 {
82 82
     return av_buffersrc_add_frame_flags(ctx, (AVFrame *)frame,
83 83
                                         AV_BUFFERSRC_FLAG_KEEP_REF);
84 84
 }
85 85
 
86
-int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
86
+int attribute_align_arg av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
87 87
 {
88 88
     return av_buffersrc_add_frame_flags(ctx, frame, 0);
89 89
 }
... ...
@@ -91,7 +91,7 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
91 91
 static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
92 92
                                            AVFrame *frame, int flags);
93 93
 
94
-int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
94
+int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
95 95
 {
96 96
     AVFrame *copy = NULL;
97 97
     int ret = 0;
... ...
@@ -115,8 +115,8 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags
115 115
     return ret;
116 116
 }
117 117
 
118
-static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx,
119
-                                                               AVFrame *frame, int flags)
118
+static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
119
+                                           AVFrame *frame, int flags)
120 120
 {
121 121
     BufferSourceContext *s = ctx->priv;
122 122
     AVFrame *copy;