Mercurial > libavformat.hg
changeset 1764:913e0d9b82d3 libavformat
iam pretty sure send time is dts and not pts ...
author | michael |
---|---|
date | Wed, 07 Feb 2007 23:06:13 +0000 |
parents | e77907af9057 |
children | 420d54aeca16 |
files | asf-enc.c asf.h |
diffstat | 2 files changed, 3 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/asf-enc.c Wed Feb 07 22:51:42 2007 +0000 +++ b/asf-enc.c Wed Feb 07 23:06:13 2007 +0000 @@ -505,7 +505,6 @@ put_flush_packet(&s->pb); asf->packet_nb_payloads = 0; - asf->prev_packet_sent_time = 0; asf->packet_timestamp_start = -1; asf->packet_timestamp_end = -1; init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1, @@ -596,7 +595,6 @@ put_flush_packet(&s->pb); asf->nb_packets++; asf->packet_nb_payloads = 0; - asf->prev_packet_sent_time = asf->packet_timestamp_start; asf->packet_timestamp_start = -1; asf->packet_timestamp_end = -1; init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1, @@ -667,19 +665,13 @@ asf->packet_size_left = PACKET_SIZE - PACKET_HEADER_MIN_SIZE; frag_len1 = SINGLE_PAYLOAD_DATA_LENGTH; } - if (asf->prev_packet_sent_time > timestamp) - asf->packet_timestamp_start = asf->prev_packet_sent_time; - else - asf->packet_timestamp_start = timestamp; + asf->packet_timestamp_start = timestamp; } else { // multi payloads frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS; - if (asf->prev_packet_sent_time > timestamp) - asf->packet_timestamp_start = asf->prev_packet_sent_time; - else if (asf->packet_timestamp_start >= timestamp) - asf->packet_timestamp_start = timestamp; + asf->packet_timestamp_start = timestamp; } if (frag_len1 > 0) { if (payload_len > frag_len1) @@ -730,7 +722,7 @@ asf->duration= FFMAX(asf->duration, duration); packet_st = asf->nb_packets; - put_frame(s, stream, pkt->pts, pkt->data, pkt->size, pkt->flags); + put_frame(s, stream, pkt->dts, pkt->data, pkt->size, pkt->flags); /* check index */ if ((!asf->is_streamed) && (codec->codec_type == CODEC_TYPE_VIDEO) && (pkt->flags & PKT_FLAG_KEY)) {
--- a/asf.h Wed Feb 07 22:51:42 2007 +0000 +++ b/asf.h Wed Feb 07 23:06:13 2007 +0000 @@ -82,7 +82,6 @@ /* packet filling */ unsigned char multi_payloads_present; int packet_size_left; - int prev_packet_sent_time; int packet_timestamp_start; int packet_timestamp_end; unsigned int packet_nb_payloads;