dont set the keyframe flag for audio as microshitty doesnt do it and some things...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Feb 2007 19:24:53 +0000 (19:24 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Feb 2007 19:24:53 +0000 (19:24 +0000)
Originally committed as revision 7952 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/asf-enc.c
tests/ffmpeg.regression.ref
tests/libav.regression.ref
tests/rotozoom.regression.ref

index 50c282d..1d9b5ab 100644 (file)
@@ -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++) {
index f403c5d..e79ce1b 100644 (file)
@@ -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
index 06c7be7..e637f5e 100644 (file)
@@ -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
index 544b231..73af21c 100644 (file)
@@ -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