Commit 14c8ee00 authored by Michael Niedermayer's avatar Michael Niedermayer

vp3dec: move threads check out of header packet type check

Prevents reconfiguration with threads which is unsupported
and would bring the contexts into an inconsistent state.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1336382c
......@@ -1928,11 +1928,11 @@ static int vp3_decode_frame(AVCodecContext *avctx,
int type = get_bits(&gb, 7);
skip_bits_long(&gb, 6*8); /* "theora" */
if (s->avctx->active_thread_type&FF_THREAD_FRAME) {
av_log(avctx, AV_LOG_ERROR, "midstream reconfiguration with multithreading is unsupported, try -threads 1\n");
return AVERROR_PATCHWELCOME;
}
if (type == 0) {
if (s->avctx->active_thread_type&FF_THREAD_FRAME) {
av_log(avctx, AV_LOG_ERROR, "midstream reconfiguration with multithreading is unsupported, try -threads 1\n");
return AVERROR_PATCHWELCOME;
}
vp3_decode_end(avctx);
ret = theora_decode_header(avctx, &gb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment