Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2014-01-11 06:38:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-01-12 01:35:14 +0400
commit0065d2d520caab2321b35a7bec5d62564913238b (patch)
treebefcd4373108a8cfb5e5e806f6bd1a9650e9bc05 /libavcodec/vp9.c
parent7dc0aba3fb9d017e0e6ac7fbdc596bc40214a318 (diff)
vp9: fix mt-related hang a parser infinite loop.
Fixes trac ticket 3274. Looked-at-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index bba600b73d..ec6ceb010d 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3592,11 +3592,15 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
data += 4;
size -= 4;
}
- if (tile_size > size)
+ if (tile_size > size) {
+ ff_thread_report_progress(&s->frames[CUR_FRAME].tf, INT_MAX, 0);
return AVERROR_INVALIDDATA;
+ }
ff_vp56_init_range_decoder(&s->c_b[tile_col], data, tile_size);
- if (vp56_rac_get_prob_branchy(&s->c_b[tile_col], 128)) // marker bit
+ if (vp56_rac_get_prob_branchy(&s->c_b[tile_col], 128)) { // marker bit
+ ff_thread_report_progress(&s->frames[CUR_FRAME].tf, INT_MAX, 0);
return AVERROR_INVALIDDATA;
+ }
data += tile_size;
size -= tile_size;
}