# HG changeset patch # User michael # Date 1085526360 0 # Node ID 40069a91d1a065191b541e62513447a91b65f79e # Parent 0dd5b381fc9ab7e00d148da375e5c9cb9179bb25 dont add padding in the middle of the data patch by (Sidik Isani ) diff -r 0dd5b381fc9a -r 40069a91d1a0 mpeg.c --- a/mpeg.c Mon May 24 15:13:23 2004 +0000 +++ b/mpeg.c Tue May 25 23:06:00 2004 +0000 @@ -730,6 +730,15 @@ } } + if (s->is_mpeg2) { + /* special stuffing byte that is always written + to prevent accidental generation of start codes. */ + put_byte(&ctx->pb, 0xff); + + for(i=0;ipb, 0xff); + } + if (startcode == PRIVATE_STREAM_1) { put_byte(&ctx->pb, id); if (id >= 0xa0) { @@ -746,15 +755,6 @@ } } - if (s->is_mpeg2) { - /* special stuffing byte that is always written - to prevent accidental generation of start codes. */ - put_byte(&ctx->pb, 0xff); - - for(i=0;ipb, 0xff); - } - /* output data */ put_buffer(&ctx->pb, stream->buffer, payload_size - stuffing_size); }