Commit 67c15461 authored by michaelni's avatar michaelni

b frames & slices bugfix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@377 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f8fd2911
...@@ -220,9 +220,15 @@ static int h263_decode_frame(AVCodecContext *avctx, ...@@ -220,9 +220,15 @@ static int h263_decode_frame(AVCodecContext *avctx,
if (h > 16) if (h > 16)
h = 16; h = 16;
offset = y * s->linesize; offset = y * s->linesize;
if(s->pict_type==B_TYPE || (!s->has_b_frames)){
src_ptr[0] = s->current_picture[0] + offset; src_ptr[0] = s->current_picture[0] + offset;
src_ptr[1] = s->current_picture[1] + (offset >> 2); src_ptr[1] = s->current_picture[1] + (offset >> 2);
src_ptr[2] = s->current_picture[2] + (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, avctx->draw_horiz_band(avctx, src_ptr, s->linesize,
y, s->width, h); y, s->width, h);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment