diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-12-17 19:53:05 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-12-17 19:53:05 +0000 |
commit | d60a8f85d7016af8a412acfc8e220445a3c3436d (patch) | |
tree | 2cb76e762ac95f7655916125cd73a0b8564c3d20 /libavcodec/mpeg12.c | |
parent | 044007c220ddda46e33432fc0501c1c244caa6fb (diff) | |
download | ffmpeg-d60a8f85d7016af8a412acfc8e220445a3c3436d.tar.gz |
vbv_delay
Originally committed as revision 2623 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 2d50ff9b73..8a240da276 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -408,7 +408,9 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) s->fake_picture_number++; put_bits(&s->pb, 3, s->pict_type); - put_bits(&s->pb, 16, 0xffff); /* non constant bit rate */ + + s->vbv_delay_ptr= s->pb.buf + get_bit_count(&s->pb)/8; + put_bits(&s->pb, 16, 0xFFFF); /* vbv_delay */ // RAL: Forward f_code also needed for B frames if (s->pict_type == P_TYPE || s->pict_type == B_TYPE) { @@ -1758,7 +1760,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; - int ref, f_code; + int ref, f_code, vbv_delay; init_get_bits(&s->gb, buf, buf_size*8); @@ -1766,7 +1768,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, s->pict_type = get_bits(&s->gb, 3); dprintf("pict_type=%d number=%d\n", s->pict_type, s->picture_number); - skip_bits(&s->gb, 16); + vbv_delay= get_bits(&s->gb, 16); if (s->pict_type == P_TYPE || s->pict_type == B_TYPE) { s->full_pel[0] = get_bits1(&s->gb); f_code = get_bits(&s->gb, 3); |