Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2371:949f84ce470a libavcodec
10l (dont use codec_id for error simulation)
author | michael |
---|---|
date | Sun, 28 Nov 2004 14:58:50 +0000 |
parents | 26560d4fdb1f |
children | 3daf36fd1999 |
comparison
equal
deleted
inserted
replaced
2370:26560d4fdb1f | 2371:949f84ce470a |
---|---|
4565 | 4565 |
4566 assert((put_bits_count(&s->pb)&7) == 0); | 4566 assert((put_bits_count(&s->pb)&7) == 0); |
4567 current_packet_size= pbBufPtr(&s->pb) - s->ptr_lastgob; | 4567 current_packet_size= pbBufPtr(&s->pb) - s->ptr_lastgob; |
4568 | 4568 |
4569 if(s->avctx->error_rate && s->resync_mb_x + s->resync_mb_y > 0){ | 4569 if(s->avctx->error_rate && s->resync_mb_x + s->resync_mb_y > 0){ |
4570 int r= put_bits_count(&s->pb)/8 + s->picture_number + s->codec_id + s->mb_x + s->mb_y; | 4570 int r= put_bits_count(&s->pb)/8 + s->picture_number + 16 + s->mb_x + s->mb_y; |
4571 int d= 100 / s->avctx->error_rate; | 4571 int d= 100 / s->avctx->error_rate; |
4572 if(r % d == 0){ | 4572 if(r % d == 0){ |
4573 current_packet_size=0; | 4573 current_packet_size=0; |
4574 #ifndef ALT_BITSTREAM_WRITER | 4574 #ifndef ALT_BITSTREAM_WRITER |
4575 s->pb.buf_ptr= s->ptr_lastgob; | 4575 s->pb.buf_ptr= s->ptr_lastgob; |