mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
iam pretty sure send time is dts and not pts ...
Originally committed as revision 7879 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2a1c3b8b90
commit
190972a06e
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user