summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/error_resilience.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/error_resilience.c')
-rw-r--r--src/libffmpeg/libavcodec/error_resilience.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libffmpeg/libavcodec/error_resilience.c b/src/libffmpeg/libavcodec/error_resilience.c
index 3cb8d40bc..5a8df74d2 100644
--- a/src/libffmpeg/libavcodec/error_resilience.c
+++ b/src/libffmpeg/libavcodec/error_resilience.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <alloca.h>
+
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -295,14 +297,16 @@ static void v_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stri
}
static void guess_mv(MpegEncContext *s){
- UINT8 fixed[s->mb_num];
+ UINT8 *fixed;
#define MV_FROZEN 3
#define MV_CHANGED 2
#define MV_UNCHANGED 1
const int mb_width = s->mb_width;
const int mb_height= s->mb_height;
int i, depth, num_avail;
-
+
+ fixed = alloca(s->mb_num);
+
num_avail=0;
for(i=0; i<s->mb_num; i++){
int f=0;