[XviD-devel] PATCH: Integer division by 0 on seek

Michael Militzer michael at xvid.org
Tue Jul 24 11:51:42 CEST 2007


Hello Haruhiko,

we have checked your patch and believe it's probably overkill to not decode
a B-frame at all when (dec->time_pp==0). We've committed an alternative
fix to CVS head (see bitstream.c, l. 823) that prevents dec->time_pp being
set to zero.

This should (hopefully) fix your problem as well. For broken bitstreams
where one of the reference frames of a b-frame might be broken, the b-frame
will still be decoded. Obviously with errors but better than nothing...

Regards,
Michael


Quoting Haruhiko Yamagata <h.yamagata at nifty.com>:

> Hello Michael, thank you for quick reply.
>
> This is the patch.
>
> Best regards,
>   Haruhiko Yamagata
>
> Index: src/decoder.c
> ===================================================================
> RCS file: /xvid/xvidcore/src/decoder.c,v
> retrieving revision 1.80
> diff -u -r1.80 decoder.c
> --- src/decoder.c 16 Apr 2007 19:01:28 -0000 1.80
> +++ src/decoder.c 19 Jul 2007 10:23:59 -0000
> @@ -1715,7 +1715,7 @@
>        image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,
>              "broken b-frame, mising ref frames");
>        if (stats) stats->type = XVID_TYPE_NOTHING;
> -    } else if (dec->time_pp <= dec->time_bp) {
> +    } else if (dec->time_pp <= dec->time_bp || dec->time_pp==0) {
>        /* this occurs when dx50_bvop_compatibility==0 sequences are
>        decoded in vfw. */
>        image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,
>
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>





More information about the XviD-devel mailing list