# HG changeset patch # User michael # Date 1070763030 0 # Node ID 64c370fe6e884a9209c31cdf6c7c5e867ee8fe69 # Parent 4c9fd29f1606984e2fc75ee76fb798a67769d73e slice flush / position fix diff -r 4c9fd29f1606 -r 64c370fe6e88 mpegvideo.c --- a/mpegvideo.c Sun Dec 07 01:33:45 2003 +0000 +++ b/mpegvideo.c Sun Dec 07 02:10:30 2003 +0000 @@ -3916,7 +3916,9 @@ ff_mpeg4_stuffing(&s->pb); align_put_bits(&s->pb); -// flush_put_bits(&s->pb); + flush_put_bits(&s->pb); + + assert((get_bit_count(&s->pb)&7) == 0); current_packet_size= pbBufPtr(&s->pb) - s->ptr_lastgob; if (s->avctx->rtp_callback) @@ -3944,7 +3946,7 @@ s->last_bits= bits; } - s->ptr_lastgob = pbBufPtr(&s->pb); + s->ptr_lastgob += current_packet_size; s->first_slice_line=1; s->resync_mb_x=mb_x; s->resync_mb_y=mb_y;