aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-12 19:24:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-12 19:24:53 +0000
commit0d9f863340138e83a5c99f47d3ca46a2dc3b3351 (patch)
tree50f38e42e0af3bee22a6f58e0589dfca32cc6cb2
parent5600b6e19e05aed9f5734450a3a3da2deed6ee4e (diff)
downloadffmpeg-0d9f863340138e83a5c99f47d3ca46a2dc3b3351.tar.gz
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?
Originally committed as revision 7952 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/asf-enc.c8
-rw-r--r--tests/ffmpeg.regression.ref6
-rw-r--r--tests/libav.regression.ref2
-rw-r--r--tests/rotozoom.regression.ref6
4 files changed, 13 insertions, 9 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c
index 50c282d61a..1d9b5ab83d 100644
--- a/libavformat/asf-enc.c
+++ b/libavformat/asf-enc.c
@@ -715,10 +715,14 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext *codec;
int64_t packet_st,pts;
int start_sec,i;
+ int flags= pkt->flags;
codec = s->streams[pkt->stream_index]->codec;
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)
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
assert(pts != AV_NOPTS_VALUE);
@@ -726,10 +730,10 @@ 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->dts, pkt->data, pkt->size, pkt->flags);
+ put_frame(s, stream, pkt->dts, pkt->data, pkt->size, flags);
/* 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));
if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) {
for(i=asf->nb_index_count;i<start_sec;i++) {
diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref
index f403c5d0d7..e79ce1b2fe 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
-768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf
+a2176602cfebad51f5688f793ab5d59a *./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
-c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf
+df1c902a4518a06afed977a8a74a60c9 *./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
-ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf
+b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
35686 ./data/a-vorbis.asf
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
stddev:3882.46 PSNR:24.54 bytes:1056768
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index 06c7be7323..e637f5eacd 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
-149792fc0d4e5ccb395c47716e2975d9 *./data/b-libav.asf
+59fc383cd61e42b938f26674b8ed8dda *./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 544b231129..73af21c05a 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
-768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf
+a2176602cfebad51f5688f793ab5d59a *./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
-c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf
+df1c902a4518a06afed977a8a74a60c9 *./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
-ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf
+b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
35686 ./data/a-vorbis.asf
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
stddev:3882.46 PSNR:24.54 bytes:1056768