On 01/05/12 09:59, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <[email protected]>
> 
> This properly synchronizes frame size changes between threads if
> subsequent threads abort decoding before frame size is initialized, i.e.
> it prevents the thread after that from ping-ponging back to the original
> value.
> 
> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> ---
>  libavcodec/vp8.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
> index 1c973d5..d9fdd4d 100644
> --- a/libavcodec/vp8.c
> +++ b/libavcodec/vp8.c
> @@ -1833,6 +1833,8 @@ static int 
> vp8_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
>          (s_src->mb_width != s->mb_width || s_src->mb_height != 
> s->mb_height)) {
>          free_buffers(s);
>          s->maps_are_invalid = 1;
> +        s->mb_width  = s_src->mb_width;
> +        s->mb_height = s_src->mb_height;
>      }
>  
>      s->prob[0] = s_src->prob[!s_src->update_probabilities];

Seems fine, I guess.

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to