mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-14 19:25:01 +00:00
dont add padding in the middle of the data patch by (Sidik Isani <isani at cfht dot hawaii dot edu>)
Originally committed as revision 3158 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
50071f0b48
commit
9e9080b6f0
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user