Revision 0d9f8633

View differences:

libavformat/asf-enc.c
715 715
    AVCodecContext *codec;
716 716
    int64_t packet_st,pts;
717 717
    int start_sec,i;
718
    int flags= pkt->flags;
718 719

  
719 720
    codec = s->streams[pkt->stream_index]->codec;
720 721
    stream = &asf->streams[pkt->stream_index];
721 722

  
723
    if(codec->codec_type == CODEC_TYPE_AUDIO)
724
        flags &= ~PKT_FLAG_KEY;
725

  
722 726
    //XXX /FIXME use duration from AVPacket (quick hack by)
723 727
    pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
724 728
    assert(pts != AV_NOPTS_VALUE);
......
726 730
    asf->duration= FFMAX(asf->duration, duration);
727 731

  
728 732
    packet_st = asf->nb_packets;
729
    put_frame(s, stream, pkt->dts, pkt->data, pkt->size, pkt->flags);
733
    put_frame(s, stream, pkt->dts, pkt->data, pkt->size, flags);
730 734

  
731 735
    /* check index */
732
    if ((!asf->is_streamed) && (codec->codec_type == CODEC_TYPE_VIDEO) && (pkt->flags & PKT_FLAG_KEY)) {
736
    if ((!asf->is_streamed) && (flags & PKT_FLAG_KEY)) {
733 737
        start_sec = (int)(duration / INT64_C(10000000));
734 738
        if (start_sec != (int)(asf->last_indexed_pts / INT64_C(10000000))) {
735 739
            for(i=asf->nb_index_count;i<start_sec;i++) {
tests/ffmpeg.regression.ref
188 188
353368 ./data/a-flac.flac
189 189
c4228df189aad9567a037727d0e763e4 *./data/out.wav
190 190
stddev: 33.31 PSNR:65.87 bytes:1040384
191
768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf
191
a2176602cfebad51f5688f793ab5d59a *./data/a-wmav1.asf
192 192
99596 ./data/a-wmav1.asf
193 193
2ab193df22bb473e61015e56ac11faf3 *./data/out.wav
194 194
stddev:12251.50 PSNR:14.56 bytes:1056768
195 195
stddev:2106.00 PSNR:29.85 bytes:1048576
196
c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf
196
df1c902a4518a06afed977a8a74a60c9 *./data/a-wmav2.asf
197 197
99602 ./data/a-wmav2.asf
198 198
8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav
199 199
stddev:12255.92 PSNR:14.55 bytes:1056768
200 200
stddev:2099.31 PSNR:29.88 bytes:1048576
201
ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf
201
b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
202 202
35686 ./data/a-vorbis.asf
203 203
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
204 204
stddev:3882.46 PSNR:24.54 bytes:1056768
tests/libav.regression.ref
2 2
8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi
3 3
340344 ./data/b-libav.avi
4 4
./data/b-libav.avi CRC=0x400c29e9
5
149792fc0d4e5ccb395c47716e2975d9 *./data/b-libav.asf
5
59fc383cd61e42b938f26674b8ed8dda *./data/b-libav.asf
6 6
339767 ./data/b-libav.asf
7 7
./data/b-libav.asf CRC=0x74113749
8 8
1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm
tests/rotozoom.regression.ref
188 188
353368 ./data/a-flac.flac
189 189
c4228df189aad9567a037727d0e763e4 *./data/out.wav
190 190
stddev: 33.31 PSNR:65.87 bytes:1040384
191
768305cec342e01b7a9d38e971ef0174 *./data/a-wmav1.asf
191
a2176602cfebad51f5688f793ab5d59a *./data/a-wmav1.asf
192 192
99596 ./data/a-wmav1.asf
193 193
2ab193df22bb473e61015e56ac11faf3 *./data/out.wav
194 194
stddev:12251.50 PSNR:14.56 bytes:1056768
195 195
stddev:2106.00 PSNR:29.85 bytes:1048576
196
c706c7cf9db10df7a7353a40feddcfdd *./data/a-wmav2.asf
196
df1c902a4518a06afed977a8a74a60c9 *./data/a-wmav2.asf
197 197
99602 ./data/a-wmav2.asf
198 198
8d05d345bc14153f3d0da95fdf34e084 *./data/out.wav
199 199
stddev:12255.92 PSNR:14.55 bytes:1056768
200 200
stddev:2099.31 PSNR:29.88 bytes:1048576
201
ef725cb9c13b9437a41428eabadeba52 *./data/a-vorbis.asf
201
b7683b2b8fe2f480a508745ccbec12e0 *./data/a-vorbis.asf
202 202
35686 ./data/a-vorbis.asf
203 203
e46368ef818f2ec3abcc3f8390d14df5 *./data/out.wav
204 204
stddev:3882.46 PSNR:24.54 bytes:1056768

Also available in: Unified diff