diff options
-rw-r--r-- | libavformat/asf-enc.c | 14 | ||||
-rw-r--r-- | libavformat/asf.h | 1 | ||||
-rw-r--r-- | tests/ffmpeg.regression.ref | 6 | ||||
-rw-r--r-- | tests/libav.regression.ref | 2 | ||||
-rw-r--r-- | tests/rotozoom.regression.ref | 6 |
5 files changed, 10 insertions, 19 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)) { diff --git a/libavformat/asf.h b/libavformat/asf.h index 7cdefb018d..6178bdc702 100644 --- a/libavformat/asf.h +++ b/libavformat/asf.h @@ -82,7 +82,6 @@ typedef struct { /* 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; diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index 7511eeaf3c..0f1c5086bb 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac 353368 ./data/a-flac.flac c4228df189aad9567a037727d0e763e4 *./data/out.wav stddev: 33.31 PSNR:65.87 bytes:1040384 -75d124394e3e8b733f5563bd282eec85 *./data/a-wmav1.asf +9fe59eb60481009f6f7d13d1b031975d *./data/a-wmav1.asf 99596 ./data/a-wmav1.asf 2ab193df22bb473e61015e56ac11faf3 *./data/out.wav stddev:12251.50 PSNR:14.56 bytes:1056768 stddev:2106.00 PSNR:29.85 bytes:1048576 -23d66614fc8bd437e3ca8c1c6c345a33 *./data/a-wmav2.asf +ff09659af56c931350db4dec737eea7f *./data/a-wmav2.asf 99602 ./data/a-wmav2.asf 8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav stddev:12255.92 PSNR:14.55 bytes:1056768 stddev:2099.31 PSNR:29.88 bytes:1048576 -6a55c7b433fbe4cd1ca21d149aaeb525 *./data/a-vorbis.asf +e56c2c60b025594eac3ba670ae3cc50d *./data/a-vorbis.asf 35686 ./data/a-vorbis.asf 295d828df6167db030d0812ce1a8fd93 *./data/out.wav stddev:3882.46 PSNR:24.54 bytes:1056768 diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index 2fa600255e..79ee93e625 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -2,7 +2,7 @@ ffmpeg regression test 8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi 340344 ./data/b-libav.avi ./data/b-libav.avi CRC=0x400c29e9 -a46c4f3fc33587cbb644363066281424 *./data/b-libav.asf +af76964183b72ab3e18f1581e55950db *./data/b-libav.asf 339767 ./data/b-libav.asf ./data/b-libav.asf CRC=0x74113749 1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index 4f846c3003..04c356dbba 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac 353368 ./data/a-flac.flac c4228df189aad9567a037727d0e763e4 *./data/out.wav stddev: 33.31 PSNR:65.87 bytes:1040384 -75d124394e3e8b733f5563bd282eec85 *./data/a-wmav1.asf +9fe59eb60481009f6f7d13d1b031975d *./data/a-wmav1.asf 99596 ./data/a-wmav1.asf 2ab193df22bb473e61015e56ac11faf3 *./data/out.wav stddev:12251.50 PSNR:14.56 bytes:1056768 stddev:2106.00 PSNR:29.85 bytes:1048576 -23d66614fc8bd437e3ca8c1c6c345a33 *./data/a-wmav2.asf +ff09659af56c931350db4dec737eea7f *./data/a-wmav2.asf 99602 ./data/a-wmav2.asf 8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav stddev:12255.92 PSNR:14.55 bytes:1056768 stddev:2099.31 PSNR:29.88 bytes:1048576 -6a55c7b433fbe4cd1ca21d149aaeb525 *./data/a-vorbis.asf +e56c2c60b025594eac3ba670ae3cc50d *./data/a-vorbis.asf 35686 ./data/a-vorbis.asf 295d828df6167db030d0812ce1a8fd93 *./data/out.wav stddev:3882.46 PSNR:24.54 bytes:1056768 |