diff options
author | Mans Rullgard <mans@mansr.com> | 2010-07-04 01:57:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-22 19:45:22 +0200 |
commit | 39b0165f9e11c7f66ae563864e2738cf9efa477f (patch) | |
tree | 19ac42cc2ae85014a6b9597d7d4d17ec5c152d76 /libavcodec | |
parent | 364f36792199549e7cb1d1a96f7ddffec975bb61 (diff) | |
download | ffmpeg-39b0165f9e11c7f66ae563864e2738cf9efa477f.tar.gz |
er: replace VLA with malloc/free
(cherry picked from commit 5c2d016a85453f121285d125ed049a8cf492855a)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/error_resilience.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index cf967bf215..8a2a7ae3eb 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -358,7 +358,7 @@ static void v_block_filter(MpegEncContext *s, uint8_t *dst, int w, int h, int st } static void guess_mv(MpegEncContext *s){ - uint8_t fixed[s->mb_stride * s->mb_height]; + uint8_t *fixed = av_malloc(s->mb_stride * s->mb_height); #define MV_FROZEN 3 #define MV_CHANGED 2 #define MV_UNCHANGED 1 @@ -414,7 +414,7 @@ static void guess_mv(MpegEncContext *s){ decode_mb(s, 0); } } - return; + goto end; } for(depth=0;; depth++){ @@ -634,7 +634,7 @@ score_sum+= best_score; } if(none_left) - return; + goto end; for(i=0; i<s->mb_num; i++){ int mb_xy= s->mb_index2xy[i]; @@ -643,6 +643,8 @@ score_sum+= best_score; } // printf(":"); fflush(stdout); } +end: + av_free(fixed); } static int is_intra_more_likely(MpegEncContext *s){ |