Commit 01e8ff27 authored by Michael Niedermayer's avatar Michael Niedermayer

slice flush / position fix

Originally committed as revision 2569 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ba58dabc
......@@ -3916,7 +3916,9 @@ static void encode_picture(MpegEncContext *s, int picture_number)
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 @@ static void encode_picture(MpegEncContext *s, int picture_number)
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;
......
......@@ -32,10 +32,10 @@ stddev: 0.00 bytes:7602176
e9f63126859b97cd23cd1413038f8f7b *./data/a-mpeg4-rc.avi
90a159074b1b109569914ee63f387860 *./data/out.yuv
stddev: 10.18 bytes:7145472
dfe8fcd409a0605ef0cb37fc5e76ecf7 *./data/a-mpeg4-adv.avi
c8877a6b8ed290a637c2119860b468b0 *./data/out.yuv
b3f1425e266569d5d726b88eadc13dd4 *./data/a-mpeg4-adv.avi
fb61365b22c947adbaeab74478579020 *./data/out.yuv
stddev: 7.31 bytes:7602176
cf79878f8851b5c865711842965a6c4a *./data/a-mpeg1b.mpg
eeca82dbf25257928663261428960710 *./data/a-mpeg1b.mpg
41b3baa7d8c17202e6577947ac37cad0 *./data/out.yuv
stddev: 6.32 bytes:6842368
07042f42b3119c39eb26537a84a451df *./data/a-mjpeg.avi
......
......@@ -32,10 +32,10 @@ stddev: 0.00 bytes:7602176
6a469f42ce6946dd4c708f9e51e3da6a *./data/a-mpeg4-rc.avi
df9de7134d961119705b4e0cabca1f12 *./data/out.yuv
stddev: 4.20 bytes:7145472
bb11d9808375911ea63d4f0889306037 *./data/a-mpeg4-adv.avi
e465df12f2c8a6492a6ec0b1bddc1d0d *./data/out.yuv
742ffadf3c309d2c4ac888a6a0905bf9 *./data/a-mpeg4-adv.avi
b02f71e91e9368ce94814ab3d74f91ba *./data/out.yuv
stddev: 4.97 bytes:7602176
fd09e45413a6b6e3a19bf9dd77503b17 *./data/a-mpeg1b.mpg
f68c426a1ccb7e1e7e0a76ebf01c8860 *./data/a-mpeg1b.mpg
71e80b8ff8da567f1bbff000cd925627 *./data/out.yuv
stddev: 4.07 bytes:6842368
e9218a1db885fe0262e88f9df630307d *./data/a-mjpeg.avi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment