summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-03-15 20:44:57 +0100
committerMartin Storsjö <martin@martin.st>2013-05-04 23:40:13 +0300
commit20c86571ccc71412781d4a4813e4693e0c42aec6 (patch)
treef578aeb59de1037cf08699a6c4f19173e8543f41
parentc0c2b96c136ec2cbfd808eefc26de399f447d62f (diff)
lavfi: let gcc realign the stack on public graph driving functions
The functions which actually drive the filter graph by pushing frames through it need to ensure an aligned stack for SIMD functions. This fixes a crash in YADIF filter when using a mingw build in a MSVC application. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavfilter/buffersink.c9
-rw-r--r--libavfilter/buffersrc.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 6f7529172c..94e7366955 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -58,7 +58,8 @@ 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)
{
BufferSinkContext *s = ctx->priv;
AVFilterLink *link = ctx->inputs[0];
@@ -98,7 +99,8 @@ static int read_from_fifo(AVFilterContext *ctx, AVFrame *frame,
}
-int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples)
+int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx,
+ AVFrame *frame, int nb_samples)
{
BufferSinkContext *s = ctx->priv;
AVFilterLink *link = ctx->inputs[0];
@@ -144,7 +146,8 @@ static void compat_free_buffer(AVFilterBuffer *buf)
av_free(buf);
}
-static int compat_read(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples)
+static int attribute_align_arg compat_read(AVFilterContext *ctx,
+ AVFilterBufferRef **pbuf, int nb_samples)
{
AVFilterBufferRef *buf;
AVFrame *frame;
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index a927f26c19..5e982eab54 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -88,7 +88,8 @@ int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
return ret;
}
-int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
+int attribute_align_arg av_buffersrc_add_frame(AVFilterContext *ctx,
+ AVFrame *frame)
{
BufferSourceContext *s = ctx->priv;
AVFrame *copy;