diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-04-22 21:02:18 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-04-22 21:02:18 +0000 |
commit | d697b89baba6df9b72d8c03dfdd5952fb05e2b6a (patch) | |
tree | 9c18c8313b8de3512a1a0ab6530e98fcf1e76f22 /libavcodec/h263.c | |
parent | 5751432312d00b707df88d6cda700d76add2b91c (diff) | |
download | ffmpeg-d697b89baba6df9b72d8c03dfdd5952fb05e2b6a.tar.gz |
segfault fix
Originally committed as revision 418 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 7e3fec5181..2694f96808 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -359,8 +359,13 @@ void mpeg4_encode_mb(MpegEncContext * s, uint8_t *p_pic= s->new_picture[0] + offset; s->mb_skiped=1; for(i=0; i<s->max_b_frames; i++){ - uint8_t *b_pic= s->coded_order[i+1].picture[0] + offset; - int diff= pix_abs16x16(p_pic, b_pic, s->linesize); + uint8_t *b_pic; + int diff; + + if(s->coded_order[i+1].pict_type!=B_TYPE) break; + + b_pic= s->coded_order[i+1].picture[0] + offset; + diff= pix_abs16x16(p_pic, b_pic, s->linesize); if(diff>s->qscale*70){ s->mb_skiped=0; break; |