# HG changeset patch # User bcoudurier # Date 1212971069 0 # Node ID f9cf53254a61cb3a61fcec450650ff0783685fcd # Parent 0dfc37ba945332fbd4f984fe3c70744c3c46c0c7 remove ugly ffm_nopts hack, use AVFormatContext->timestamp diff -r 0dfc37ba9453 -r f9cf53254a61 avformat.h --- a/avformat.h Sun Jun 08 17:12:25 2008 +0000 +++ b/avformat.h Mon Jun 09 00:24:29 2008 +0000 @@ -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 -r 0dfc37ba9453 -r f9cf53254a61 ffm.h --- a/ffm.h Sun Jun 08 17:12:25 2008 +0000 +++ b/ffm.h Mon Jun 09 00:24:29 2008 +0000 @@ -51,7 +51,6 @@ 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 -r 0dfc37ba9453 -r f9cf53254a61 ffmenc.c --- a/ffmenc.c Sun Jun 08 17:12:25 2008 +0000 +++ b/ffmenc.c Mon Jun 09 00:24:29 2008 +0000 @@ -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 @@ } } - /* 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 @@ 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;