mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Correct ASF duration.
Patch by Henrik Gulbrandsen: henrik gulbra net Originally committed as revision 12916 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8767060cd2
commit
4fa6eac5f1
@ -733,11 +733,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if(codec->codec_type == CODEC_TYPE_AUDIO)
|
if(codec->codec_type == CODEC_TYPE_AUDIO)
|
||||||
flags &= ~PKT_FLAG_KEY;
|
flags &= ~PKT_FLAG_KEY;
|
||||||
|
|
||||||
//XXX /FIXME use duration from AVPacket (quick hack by)
|
|
||||||
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
|
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
|
||||||
assert(pts != AV_NOPTS_VALUE);
|
assert(pts != AV_NOPTS_VALUE);
|
||||||
duration = pts * 10000;
|
duration = pts * 10000;
|
||||||
asf->duration= FFMAX(asf->duration, duration);
|
asf->duration= FFMAX(asf->duration, duration + pkt->duration * 10000);
|
||||||
|
|
||||||
packet_st = asf->nb_packets;
|
packet_st = asf->nb_packets;
|
||||||
put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags);
|
put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags);
|
||||||
|
@ -197,11 +197,11 @@ c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac
|
|||||||
353368 ./tests/data/a-flac.flac
|
353368 ./tests/data/a-flac.flac
|
||||||
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.vsynth.out.wav
|
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.vsynth.out.wav
|
||||||
stddev: 33.31 PSNR:65.87 bytes:1040384
|
stddev: 33.31 PSNR:65.87 bytes:1040384
|
||||||
a1e56bb034c2773438ba1c830c4cea07 *./tests/data/a-wmav1.asf
|
4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf
|
||||||
106004 ./tests/data/a-wmav1.asf
|
106004 ./tests/data/a-wmav1.asf
|
||||||
stddev:12251.50 PSNR:14.56 bytes:1056768
|
stddev:12251.50 PSNR:14.56 bytes:1056768
|
||||||
stddev:2106.00 PSNR:29.85 bytes:1048576
|
stddev:2106.00 PSNR:29.85 bytes:1048576
|
||||||
5e25c447c80fa937f74ed8752b0e26fb *./tests/data/a-wmav2.asf
|
24ae726aef89e5d17e315c64182f4c61 *./tests/data/a-wmav2.asf
|
||||||
106044 ./tests/data/a-wmav2.asf
|
106044 ./tests/data/a-wmav2.asf
|
||||||
stddev:12255.92 PSNR:14.55 bytes:1056768
|
stddev:12255.92 PSNR:14.55 bytes:1056768
|
||||||
stddev:2099.31 PSNR:29.88 bytes:1048576
|
stddev:2099.31 PSNR:29.88 bytes:1048576
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
8a0536ccfe36f4fff408b3327d33e1dd *./tests/data/b-libav.avi
|
8a0536ccfe36f4fff408b3327d33e1dd *./tests/data/b-libav.avi
|
||||||
340344 ./tests/data/b-libav.avi
|
340344 ./tests/data/b-libav.avi
|
||||||
./tests/data/b-libav.avi CRC=0x400c29e9
|
./tests/data/b-libav.avi CRC=0x400c29e9
|
||||||
7b859661e93df32e51942a4e0531d58e *./tests/data/b-libav.asf
|
bd9e0012aa39e956605387dd499365fb *./tests/data/b-libav.asf
|
||||||
339775 ./tests/data/b-libav.asf
|
339775 ./tests/data/b-libav.asf
|
||||||
./tests/data/b-libav.asf CRC=0x74113749
|
./tests/data/b-libav.asf CRC=0x74113749
|
||||||
c351132527ccb1e8cab06cc0822fde23 *./tests/data/b-libav.rm
|
c351132527ccb1e8cab06cc0822fde23 *./tests/data/b-libav.rm
|
||||||
|
@ -197,11 +197,11 @@ c3382f03ce2efb5d475240d288a33898 *./tests/data/a-flac.flac
|
|||||||
353368 ./tests/data/a-flac.flac
|
353368 ./tests/data/a-flac.flac
|
||||||
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.rotozoom.out.wav
|
c4228df189aad9567a037727d0e763e4 *./tests/data/flac.rotozoom.out.wav
|
||||||
stddev: 33.31 PSNR:65.87 bytes:1040384
|
stddev: 33.31 PSNR:65.87 bytes:1040384
|
||||||
a1e56bb034c2773438ba1c830c4cea07 *./tests/data/a-wmav1.asf
|
4435d87463cd6c5407bd88cca241ca56 *./tests/data/a-wmav1.asf
|
||||||
106004 ./tests/data/a-wmav1.asf
|
106004 ./tests/data/a-wmav1.asf
|
||||||
stddev:12251.50 PSNR:14.56 bytes:1056768
|
stddev:12251.50 PSNR:14.56 bytes:1056768
|
||||||
stddev:2106.00 PSNR:29.85 bytes:1048576
|
stddev:2106.00 PSNR:29.85 bytes:1048576
|
||||||
5e25c447c80fa937f74ed8752b0e26fb *./tests/data/a-wmav2.asf
|
24ae726aef89e5d17e315c64182f4c61 *./tests/data/a-wmav2.asf
|
||||||
106044 ./tests/data/a-wmav2.asf
|
106044 ./tests/data/a-wmav2.asf
|
||||||
stddev:12255.92 PSNR:14.55 bytes:1056768
|
stddev:12255.92 PSNR:14.55 bytes:1056768
|
||||||
stddev:2099.31 PSNR:29.88 bytes:1048576
|
stddev:2099.31 PSNR:29.88 bytes:1048576
|
||||||
|
Loading…
Reference in New Issue
Block a user