[FFmpeg-devel] [HACK] fix issue 944
Michael Niedermayer
michaelni
Sun Apr 12 05:08:46 CEST 2009
On Fri, Apr 10, 2009 at 01:24:33PM +0200, Reimar D?ffinger wrote:
> Hello,
> the file in issue 944 causes mb_xy to become something around -300 and
> then crashes.
> Attached patch fixes this the brute-force way, for a better fix I'd need
> hints where to look.
> Index: libavcodec/h264.c
> ===================================================================
> --- libavcodec/h264.c (revision 18407)
> +++ libavcodec/h264.c (working copy)
> @@ -1005,6 +1005,7 @@
> }else if(!(s->picture_structure & h->ref_list[1][0].reference) && !h->ref_list[1][0].mbaff){// FL -> FL & differ parity
> int fieldoff= 2*(h->ref_list[1][0].reference)-3;
> mb_xy += s->mb_stride*fieldoff;
> + mb_xy = FFMAX(mb_xy, 0);
how does it become -300 ?
reference should never become anything outside 0..7
am i right in the assumtation that reference is outside that range?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090412/41e8f444/attachment.pgp>
More information about the ffmpeg-devel
mailing list