[FFmpeg-devel] [HACK] fix issue 944
Reimar Döffinger
Reimar.Doeffinger
Sun Apr 12 10:39:09 CEST 2009
On Sun, Apr 12, 2009 at 05:08:46AM +0200, Michael Niedermayer wrote:
> 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?
This happens "directly" after these messages:
> [h264 @ 0x2bc1eb0]reference picture missing during reorder
> [h264 @ 0x2bc1eb0]Missing reference picture
The values are:
h->ref_list[1][0].reference == 0
fieldoff == -3
s->mb_stride == 121
mb_xy == 0
s->picture_structure == 1
More information about the ffmpeg-devel
mailing list