"Ronald S. Bultje" <[email protected]> writes:

> From: Michael Niedermayer <[email protected]>
>
> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> Signed-off-by: Ronald S. Bultje <[email protected]>
> ---
>  libavcodec/ituh263dec.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
> index f52ac7a..cba16b9 100644
> --- a/libavcodec/ituh263dec.c
> +++ b/libavcodec/ituh263dec.c
> @@ -1083,6 +1083,20 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
>          skip_bits(&s->gb, 2); /* Quantization information for B-pictures */
>      }
>
> +    if (s->pict_type!=AV_PICTURE_TYPE_B) {
> +        s->time= s->picture_number;
> +        s->pp_time= s->time - s->last_non_b_time;
> +        s->last_non_b_time= s->time;
> +    }else{
> +        s->time= s->picture_number;
> +        s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
> +        if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time 
> || s->pp_time<=0){
> +            s->pp_time = 2;
> +            s->pb_time = 1;
> +        }
> +        ff_mpeg4_init_direct_mv(s);
> +    }

Can't comment on the code, but pretty please fix the style.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to