[FFmpeg-devel] [PATCH] lavfi: let gcc realign the stack on public graph driving functions
Michael Niedermayer
michaelni at gmx.at
Sat Mar 16 23:46:51 CET 2013
On Sat, Mar 16, 2013 at 11:33:05PM +0100, Hendrik Leppkes wrote:
> On Fri, Mar 15, 2013 at 8:44 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> > 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.
> > ---
> > libavfilter/buffersink.c | 8 ++++----
> > libavfilter/buffersrc.c | 4 ++--
> > 2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
> > index 8236f22..9bbc8d9 100644
> > --- a/libavfilter/buffersink.c
> > +++ b/libavfilter/buffersink.c
> > @@ -117,7 +117,7 @@ int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
> > return av_buffersink_get_frame_flags(ctx, frame, 0);
> > }
> >
> > -int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
> > +int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
> > {
> > BufferSinkContext *buf = ctx->priv;
> > AVFilterLink *inlink = ctx->inputs[0];
> > @@ -169,7 +169,7 @@ 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];
> > @@ -264,7 +264,7 @@ static void compat_free_buffer(AVFilterBuffer *buf)
> > av_free(buf);
> > }
> >
> > -static int compat_read(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples, int flags)
> > +static int attribute_align_arg compat_read(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples, int flags)
> > {
> > AVFilterBufferRef *buf;
> > AVFrame *frame;
> > @@ -348,7 +348,7 @@ AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)
> > return ctx->inputs[0]->frame_rate;
> > }
> >
> > -int av_buffersink_poll_frame(AVFilterContext *ctx)
> > +int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
> > {
> > BufferSinkContext *buf = ctx->priv;
> > AVFilterLink *inlink = ctx->inputs[0];
> > diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
> > index 80fd2be..54a58fe 100644
> > --- a/libavfilter/buffersrc.c
> > +++ b/libavfilter/buffersrc.c
> > @@ -113,8 +113,8 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags
> > return ret;
> > }
> >
> > -static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
> > - AVFrame *frame, int flags)
> > +static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx,
> > + AVFrame *frame, int flags)
> > {
> > BufferSourceContext *s = ctx->priv;
> > AVFrame *copy;
> > --
> > 1.8.0.msysgit.0
> >
>
> Shameless ping. Crash fix is important fix, right-o? :)
yes, applied
nicolas might want to double check still though ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130316/d94cc288/attachment.asc>
More information about the ffmpeg-devel
mailing list