diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-02-07 23:06:13 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-02-07 23:06:13 +0000 |
commit | 190972a06e26dc1f3cd367295dd085ea66a2a2da (patch) | |
tree | 33e4a70101c754849f169c9acca278c9445fe426 /libavformat/asf-enc.c | |
parent | 2a1c3b8b907afdf44f0f30ae919fd7b46b7b70e0 (diff) | |
download | ffmpeg-190972a06e26dc1f3cd367295dd085ea66a2a2da.tar.gz |
iam pretty sure send time is dts and not pts ...
Originally committed as revision 7879 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf-enc.c')
-rw-r--r-- | libavformat/asf-enc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c index 211a144088..13bf429f90 100644 --- a/libavformat/asf-enc.c +++ b/libavformat/asf-enc.c @@ -505,7 +505,6 @@ static int asf_write_header(AVFormatContext *s) 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 @@ static void flush_packet(AVFormatContext *s) 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 @@ static void put_frame( 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 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) 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)) { |