Commit b694aea2 authored by michael's avatar michael

dont set the keyframe flag for audio as microshitty doesnt do it and some...

dont set the keyframe flag for audio as microshitty doesnt do it and some things have problems with our asfs, maybe that has a positive effect?


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7952 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dbce5cdd
...@@ -715,10 +715,14 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -715,10 +715,14 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext *codec; AVCodecContext *codec;
int64_t packet_st,pts; int64_t packet_st,pts;
int start_sec,i; int start_sec,i;
int flags= pkt->flags;
codec = s->streams[pkt->stream_index]->codec; codec = s->streams[pkt->stream_index]->codec;
stream = &asf->streams[pkt->stream_index]; stream = &asf->streams[pkt->stream_index];
if(codec->codec_type == CODEC_TYPE_AUDIO)
flags &= ~PKT_FLAG_KEY;
//XXX /FIXME use duration from AVPacket (quick hack by) //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);
...@@ -726,10 +730,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -726,10 +730,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
asf->duration= FFMAX(asf->duration, duration); asf->duration= FFMAX(asf->duration, duration);
packet_st = asf->nb_packets; packet_st = asf->nb_packets;
put_frame(s, stream, pkt->dts, pkt->data, pkt->size, pkt->flags); put_frame(s, stream, pkt->dts, pkt->data, pkt->size, flags);
/* check index */ /* check index */
if ((!asf->is_streamed) && (codec->codec_type == CODEC_TYPE_VIDEO) && (pkt->flags & PKT_FLAG_KEY)) { if ((!asf->is_streamed) && (flags & PKT_FLAG_KEY)) {
start_sec = (int)(duration / INT64_C(10000000)); start_sec = (int)(duration / INT64_C(10000000));
if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) { if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) {
for(i=asf->nb_index_count;i<start_sec;i++) { for(i=asf->nb_index_count;i<start_sec;i++) {
......
...@@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac ...@@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac
353368 ./data/a-flac.flac 353368 ./data/a-flac.flac
c4228df189aad9567a037727d0e763e4 *./data/out.wav c4228df189aad9567a037727d0e763e4 *./data/out.wav
stddev: 33.31 PSNR:65.87 bytes:1040384 stddev: 33.31 PSNR:65.87 bytes:1040384
768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf a2176602cfebad51f5688f793ab5d59a *./data/a-wmav1.asf
99596 ./data/a-wmav1.asf 99596 ./data/a-wmav1.asf
2ab193df22bb473e61015e56ac11faf3 *./data/out.wav 2ab193df22bb473e61015e56ac11faf3 *./data/out.wav
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
c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf df1c902a4518a06afed977a8a74a60c9 *./data/a-wmav2.asf
99602 ./data/a-wmav2.asf 99602 ./data/a-wmav2.asf
8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav 8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav
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
ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
35686 ./data/a-vorbis.asf 35686 ./data/a-vorbis.asf
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
stddev:3882.46 PSNR:24.54 bytes:1056768 stddev:3882.46 PSNR:24.54 bytes:1056768
...@@ -2,7 +2,7 @@ ffmpeg regression test ...@@ -2,7 +2,7 @@ ffmpeg regression test
8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi 8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi
340344 ./data/b-libav.avi 340344 ./data/b-libav.avi
./data/b-libav.avi CRC=0x400c29e9 ./data/b-libav.avi CRC=0x400c29e9
149792fc0d4e5ccb395c47716e2975d9 *./data/b-libav.asf 59fc383cd61e42b938f26674b8ed8dda *./data/b-libav.asf
339767 ./data/b-libav.asf 339767 ./data/b-libav.asf
./data/b-libav.asf CRC=0x74113749 ./data/b-libav.asf CRC=0x74113749
1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm 1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm
......
...@@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac ...@@ -188,17 +188,17 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac
353368 ./data/a-flac.flac 353368 ./data/a-flac.flac
c4228df189aad9567a037727d0e763e4 *./data/out.wav c4228df189aad9567a037727d0e763e4 *./data/out.wav
stddev: 33.31 PSNR:65.87 bytes:1040384 stddev: 33.31 PSNR:65.87 bytes:1040384
768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf a2176602cfebad51f5688f793ab5d59a *./data/a-wmav1.asf
99596 ./data/a-wmav1.asf 99596 ./data/a-wmav1.asf
2ab193df22bb473e61015e56ac11faf3 *./data/out.wav 2ab193df22bb473e61015e56ac11faf3 *./data/out.wav
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
c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf df1c902a4518a06afed977a8a74a60c9 *./data/a-wmav2.asf
99602 ./data/a-wmav2.asf 99602 ./data/a-wmav2.asf
8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav 8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav
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
ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
35686 ./data/a-vorbis.asf 35686 ./data/a-vorbis.asf
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
stddev:3882.46 PSNR:24.54 bytes:1056768 stddev:3882.46 PSNR:24.54 bytes:1056768
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment