Mercurial > libavformat.hg
changeset 3440:f9cf53254a61 libavformat
remove ugly ffm_nopts hack, use AVFormatContext->timestamp
author | bcoudurier |
---|---|
date | Mon, 09 Jun 2008 00:24:29 +0000 |
parents | 0dfc37ba9453 |
children | 2d52ccde8f86 |
files | avformat.h ffm.h ffmenc.c |
diffstat | 3 files changed, 2 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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, \
--- 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 */
--- 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;