Mercurial > libavcodec.hg
diff mpeg12.c @ 1697:f3287b5d8d9f libavcodec
vbv_delay
author | michael |
---|---|
date | Wed, 17 Dec 2003 19:53:05 +0000 |
parents | c4a4c28cc556 |
children | 3ba5c493db6f |
line wrap: on
line diff
--- a/mpeg12.c Tue Dec 16 11:17:06 2003 +0000 +++ b/mpeg12.c Wed Dec 17 19:53:05 2003 +0000 @@ -408,7 +408,9 @@ 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 @@ { 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 @@ 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);