summaryrefslogtreecommitdiff
path: root/libavformat/ffmenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-09 00:24:29 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-09 00:24:29 +0000
commit3438d82d4b3bd987304975961e2a42e82767107d (patch)
tree75415491b9bdaa85530e8f3d639b67452bdc9989 /libavformat/ffmenc.c
parentfbd971a444566844680f1eeb4efc501ba50233a0 (diff)
remove ugly ffm_nopts hack, use AVFormatContext->timestamp
Originally committed as revision 13718 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffmenc.c')
-rw-r--r--libavformat/ffmenc.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index c07beb989d..906152f978 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -22,9 +22,6 @@
#include "avformat.h"
#include "ffm.h"
-/* disable pts hack for testing */
-int ffm_nopts = 0;
-
static void flush_packet(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
@@ -173,12 +170,6 @@ static int ffm_write_header(AVFormatContext *s)
}
}
- /* hack to have real time */
- if (ffm_nopts)
- ffm->start_time = 0;
- else
- ffm->start_time = av_gettime();
-
/* flush until end of block reached */
while ((url_ftell(pb) % ffm->packet_size) != 0)
put_byte(pb, 0);
@@ -203,7 +194,7 @@ static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pts;
uint8_t header[FRAME_HEADER_SIZE];
- pts = ffm->start_time + pkt->pts;
+ pts = s->timestamp + pkt->pts;
/* packet size & key_frame */
header[0] = pkt->stream_index;
header[1] = 0;