Revision 3438d82d libavformat/ffmenc.c

View differences:

libavformat/ffmenc.c
22 22
#include "avformat.h"
23 23
#include "ffm.h"
24 24

  
25
/* disable pts hack for testing */
26
int ffm_nopts = 0;
27

  
28 25
static void flush_packet(AVFormatContext *s)
29 26
{
30 27
    FFMContext *ffm = s->priv_data;
......
173 170
        }
174 171
    }
175 172

  
176
    /* hack to have real time */
177
    if (ffm_nopts)
178
        ffm->start_time = 0;
179
    else
180
        ffm->start_time = av_gettime();
181

  
182 173
    /* flush until end of block reached */
183 174
    while ((url_ftell(pb) % ffm->packet_size) != 0)
184 175
        put_byte(pb, 0);
......
203 194
    int64_t pts;
204 195
    uint8_t header[FRAME_HEADER_SIZE];
205 196

  
206
    pts = ffm->start_time + pkt->pts;
197
    pts = s->timestamp + pkt->pts;
207 198
    /* packet size & key_frame */
208 199
    header[0] = pkt->stream_index;
209 200
    header[1] = 0;

Also available in: Unified diff