summaryrefslogtreecommitdiff
path: root/libavformat/mpegenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-09-05 17:14:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-09-05 17:14:25 +0000
commit8baaee65ba6c47e6568aebbaa5976ffcc8b7ce0e (patch)
tree8739b18f091aac5858b35d13527fa012a201e404 /libavformat/mpegenc.c
parentc1e8b67869d7a8f111c3f43d017942a0eecd86fe (diff)
export put_timestamp()
this will be needed for spliting the PES muxer code out Originally committed as revision 10409 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 2c304da94a..1bd90c4ecf 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -478,7 +478,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
return AVERROR(ENOMEM);
}
-static inline void put_timestamp(ByteIOContext *pb, int id, int64_t timestamp)
+void ff_mpeg_put_ts(ByteIOContext *pb, int id, int64_t timestamp)
{
put_byte(pb,
(id << 4) |
@@ -856,9 +856,9 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
put_byte(&ctx->pb, header_len - 3 + stuffing_size);
if (pes_flags & 0x80) /*write pts*/
- put_timestamp(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);
+ ff_mpeg_put_ts(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);
if (pes_flags & 0x40) /*write dts*/
- put_timestamp(&ctx->pb, 0x01, dts);
+ ff_mpeg_put_ts(&ctx->pb, 0x01, dts);
if (pes_flags & 0x01) { /*write pes extension*/
put_byte(&ctx->pb, 0x10); /* flags */
@@ -873,10 +873,10 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
} else {
if (pts != AV_NOPTS_VALUE) {
if (dts != pts) {
- put_timestamp(&ctx->pb, 0x03, pts);
- put_timestamp(&ctx->pb, 0x01, dts);
+ ff_mpeg_put_ts(&ctx->pb, 0x03, pts);
+ ff_mpeg_put_ts(&ctx->pb, 0x01, dts);
} else {
- put_timestamp(&ctx->pb, 0x02, pts);
+ ff_mpeg_put_ts(&ctx->pb, 0x02, pts);
}
} else {
put_byte(&ctx->pb, 0x0f);