diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 87248e76fa..533a7416e5 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -2285,6 +2285,10 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, #if defined(PIC) DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif + // HACK: gcc 4.6 no longer decrements esp, + // use this to make it reserve space for the call + // return address + void *dummy; __asm__ volatile( #if defined(PIC) @@ -2336,6 +2340,7 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, #if defined(PIC) ,"m" (ebxsave) #endif + ,"m" (dummy) : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D #if !defined(PIC) ,"%"REG_b @@ -2357,6 +2362,10 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2, #if defined(PIC) DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif + // HACK: gcc 4.6 no longer decrements esp, + // use this to make it reserve space for the call + // return address + void *dummy; __asm__ volatile( #if defined(PIC) @@ -2396,6 +2405,7 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2, #if defined(PIC) ,"m" (ebxsave) #endif + ,"m" (dummy) : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D #if !defined(PIC) ,"%"REG_b