summaryrefslogtreecommitdiff
path: root/libavformat
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
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')
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/ffm.h1
-rw-r--r--libavformat/ffmenc.c11
3 files changed, 2 insertions, 12 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 181a174392..d279506839 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -22,7 +22,7 @@
#define FFMPEG_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 14
+#define LIBAVFORMAT_VERSION_MINOR 15
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
diff --git a/libavformat/ffm.h b/libavformat/ffm.h
index ebbf992480..c758f9d817 100644
--- a/libavformat/ffm.h
+++ b/libavformat/ffm.h
@@ -51,7 +51,6 @@ typedef struct FFMContext {
int64_t pts;
uint8_t *packet_ptr, *packet_end;
uint8_t packet[FFM_PACKET_SIZE];
- int64_t start_time;
} FFMContext;
#endif /* FFMPEG_FFM_H */
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;