diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-03-12 22:54:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-03-12 22:54:25 +0000 |
commit | 6f91bcd151001b5aca0d27ae154fd60c384ff167 (patch) | |
tree | b7a213d3d501006e0e6cc14a2605bb74336d8d27 /libavcodec/h263dec.c | |
parent | e2263827d5272576e8f2893254e054476b01ee19 (diff) | |
download | ffmpeg-6f91bcd151001b5aca0d27ae154fd60c384ff167.tar.gz |
mpeg4 b-frames :)
create slightly more correct headers & add "ffmpeg" user-data section
Originally committed as revision 328 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 82ba258287..cb265d2ef9 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -45,6 +45,7 @@ static int h263_decode_init(AVCodecContext *avctx) case CODEC_ID_MPEG4: s->time_increment_bits = 4; /* default value for broken headers */ s->h263_pred = 1; + s->has_b_frames = 1; break; case CODEC_ID_MSMPEG4: s->h263_msmpeg4 = 1; @@ -219,9 +220,15 @@ static int h263_decode_frame(AVCodecContext *avctx, MPV_frame_end(s); - pict->data[0] = s->current_picture[0]; - pict->data[1] = s->current_picture[1]; - pict->data[2] = s->current_picture[2]; + if(s->pict_type==B_TYPE){ + pict->data[0] = s->current_picture[0]; + pict->data[1] = s->current_picture[1]; + pict->data[2] = s->current_picture[2]; + } else { + pict->data[0] = s->last_picture[0]; + pict->data[1] = s->last_picture[1]; + pict->data[2] = s->last_picture[2]; + } pict->linesize[0] = s->linesize; pict->linesize[1] = s->linesize / 2; pict->linesize[2] = s->linesize / 2; |