Mercurial > libavformat.hg
changeset 3491:31aa7b51c13b libavformat
store dts in ffm headers
author | bcoudurier |
---|---|
date | Sun, 22 Jun 2008 08:50:57 +0000 |
parents | e410c33e60f6 |
children | 6facc89bece8 |
files | ffmenc.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ffmenc.c Sun Jun 22 08:44:58 2008 +0000 +++ b/ffmenc.c Sun Jun 22 08:50:57 2008 +0000 @@ -188,11 +188,11 @@ static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt) { - int64_t pts; + int64_t dts; uint8_t header[FRAME_HEADER_SIZE]; int header_size = FRAME_HEADER_SIZE; - pts = s->timestamp + pkt->pts; + dts = s->timestamp + pkt->dts; /* packet size & key_frame */ header[0] = pkt->stream_index; header[1] = 0; @@ -200,14 +200,14 @@ header[1] |= FLAG_KEY_FRAME; AV_WB24(header+2, pkt->size); AV_WB24(header+5, pkt->duration); - AV_WB64(header+8, pts); + AV_WB64(header+8, s->timestamp + pkt->pts); if (pkt->pts != pkt->dts) { header[1] |= FLAG_DTS; AV_WB32(header+16, pkt->pts - pkt->dts); header_size += 4; } - ffm_write_data(s, header, header_size, pts, 1); - ffm_write_data(s, pkt->data, pkt->size, pts, 0); + ffm_write_data(s, header, header_size, dts, 1); + ffm_write_data(s, pkt->data, pkt->size, dts, 0); return 0; }