diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-04-05 04:23:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-04-05 04:23:01 +0000 |
commit | 3c4f1840e6cbc9e3f67f24cadfa92a1f54e8cf57 (patch) | |
tree | 566830be5cdfb0fd54bd5efa30bbe80e74005b67 /libavcodec | |
parent | 84afee348f7342f60cf803d398be0013a5fcddc5 (diff) | |
download | ffmpeg-3c4f1840e6cbc9e3f67f24cadfa92a1f54e8cf57.tar.gz |
b frames & slices bugfix
Originally committed as revision 377 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h263dec.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 02f59551f4..50440d18a8 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -220,9 +220,15 @@ static int h263_decode_frame(AVCodecContext *avctx, if (h > 16) h = 16; offset = y * s->linesize; - src_ptr[0] = s->current_picture[0] + offset; - src_ptr[1] = s->current_picture[1] + (offset >> 2); - src_ptr[2] = s->current_picture[2] + (offset >> 2); + if(s->pict_type==B_TYPE || (!s->has_b_frames)){ + src_ptr[0] = s->current_picture[0] + offset; + src_ptr[1] = s->current_picture[1] + (offset >> 2); + src_ptr[2] = s->current_picture[2] + (offset >> 2); + } else { + src_ptr[0] = s->last_picture[0] + offset; + src_ptr[1] = s->last_picture[1] + (offset >> 2); + src_ptr[2] = s->last_picture[2] + (offset >> 2); + } avctx->draw_horiz_band(avctx, src_ptr, s->linesize, y, s->width, h); } |