Commit e52ebfef authored by michael's avatar michael

dont add padding in the middle of the data patch by (Sidik Isani <isani at...

dont add padding in the middle of the data patch by (Sidik Isani <isani at cfht dot hawaii dot edu>)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3158 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cfa075f3
......@@ -730,6 +730,15 @@ static void flush_packet(AVFormatContext *ctx, int stream_index,
}
}
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;i<stuffing_size;i++)
put_byte(&ctx->pb, 0xff);
}
if (startcode == PRIVATE_STREAM_1) {
put_byte(&ctx->pb, id);
if (id >= 0xa0) {
......@@ -746,15 +755,6 @@ static void flush_packet(AVFormatContext *ctx, int stream_index,
}
}
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;i<stuffing_size;i++)
put_byte(&ctx->pb, 0xff);
}
/* output data */
put_buffer(&ctx->pb, stream->buffer, payload_size - stuffing_size);
}
......
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