Commit af2a196e authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2a1a599b
...@@ -118,7 +118,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) ...@@ -118,7 +118,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
return 0; 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); return av_buffersink_get_frame_flags(ctx, frame, 0);
} }
...@@ -272,7 +272,7 @@ static void compat_free_buffer(AVFilterBuffer *buf) ...@@ -272,7 +272,7 @@ static void compat_free_buffer(AVFilterBuffer *buf)
av_free(buf); av_free(buf);
} }
static int attribute_align_arg compat_read(AVFilterContext *ctx, static int compat_read(AVFilterContext *ctx,
AVFilterBufferRef **pbuf, int nb_samples, int flags) AVFilterBufferRef **pbuf, int nb_samples, int flags)
{ {
AVFilterBufferRef *buf; AVFilterBufferRef *buf;
...@@ -326,18 +326,18 @@ fail: ...@@ -326,18 +326,18 @@ fail:
return ret; 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); return compat_read(ctx, buf, 0, 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) int nb_samples)
{ {
return compat_read(ctx, buf, nb_samples, 0); return compat_read(ctx, buf, nb_samples, 0);
} }
int av_buffersink_get_buffer_ref(AVFilterContext *ctx, int attribute_align_arg av_buffersink_get_buffer_ref(AVFilterContext *ctx,
AVFilterBufferRef **bufref, int flags) AVFilterBufferRef **bufref, int flags)
{ {
*bufref = NULL; *bufref = NULL;
......
...@@ -77,13 +77,13 @@ typedef struct { ...@@ -77,13 +77,13 @@ typedef struct {
return AVERROR(EINVAL);\ 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, return av_buffersrc_add_frame_flags(ctx, (AVFrame *)frame,
AV_BUFFERSRC_FLAG_KEEP_REF); 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); return av_buffersrc_add_frame_flags(ctx, frame, 0);
} }
...@@ -91,7 +91,7 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame) ...@@ -91,7 +91,7 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
static int av_buffersrc_add_frame_internal(AVFilterContext *ctx, static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
AVFrame *frame, int flags); 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; AVFrame *copy = NULL;
int ret = 0; int ret = 0;
...@@ -115,7 +115,7 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags ...@@ -115,7 +115,7 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags
return ret; return ret;
} }
static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx, static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
AVFrame *frame, int flags) AVFrame *frame, int flags)
{ {
BufferSourceContext *s = ctx->priv; BufferSourceContext *s = ctx->priv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment