summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorSidik Isani <isani@cfht.hawaii.edu>2004-05-25 23:06:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-25 23:06:00 +0000
commit9e9080b6f0eb441fabfd6fc637dfee4e67b06673 (patch)
tree7d50a1e762241a6d5a8b1c1d8fc5096ffc2f5d2d /libavformat/mpeg.c
parent50071f0b4875e9d6969fb3fc474b0d7c7bf97dff (diff)
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
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 6618d5f469..e0060584c6 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -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);
}