Revision 82e415b1

View differences:

libavformat/avienc.c
613 613
                url_fseek(pb, avi->frames_hdr_strm[n], SEEK_SET);
614 614
                ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
615 615
                if (au_ssize == 0) {
616
                    put_le32(pb, stream->frame_number);
617
                    nb_frames += stream->frame_number;
616
                    put_le32(pb, avi->packet_count[n]);
617
                    nb_frames += avi->packet_count[n];
618 618
                } else {
619 619
                    put_le32(pb, avi->audio_strm_length[n] / au_ssize);
620 620
                }
......
730 730
        for (n=nb_frames=0;n<s->nb_streams;n++) {
731 731
             AVCodecContext *stream = s->streams[n]->codec;
732 732
             if (stream->codec_type == CODEC_TYPE_VIDEO) {
733
                 if (nb_frames < stream->frame_number)
734
                     nb_frames = stream->frame_number;
733
                 if (nb_frames < avi->packet_count[n])
734
                     nb_frames = avi->packet_count[n];
735 735
             } else {
736 736
                 if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3) {
737
                     nb_frames += stream->frame_number;
737
                     nb_frames += avi->packet_count[n];
738 738
                }
739 739
            }
740 740
        }
tests/ffmpeg.regression.ref
59 59
7932708 ./data/a-huffyuv.avi
60 60
799d3db687f6cdd7a837ec156efc171f *./data/out.yuv
61 61
stddev:  0.00 PSNR:99.99 bytes:7602176
62
d37d4d4b5acfffe3a01a72f51c162a82 *./data/a-mpeg4-rc.avi
62
acf1fb041e2208742df6a083ee24f6bb *./data/a-mpeg4-rc.avi
63 63
822270 ./data/a-mpeg4-rc.avi
64 64
3ecd1afdaf2d691d01628737326dda35 *./data/out.yuv
65 65
stddev: 10.41 PSNR:27.76 bytes:7602176
66
81078d7852dfd6041ff17b5dc8ed0ffc *./data/a-mpeg4-adv.avi
66
b3060dfd7638093b92de96ccc4568409 *./data/a-mpeg4-adv.avi
67 67
600240 ./data/a-mpeg4-adv.avi
68 68
0b7935cee2070f3b838478cea6dc4b3c *./data/out.yuv
69 69
stddev: 10.25 PSNR:27.90 bytes:7602176
70
052f9e98112011ddc302b521e34d6385 *./data/a-mpeg4-thread.avi
70
0ba8ddfbdf68c7b53b24da5915b6bbf1 *./data/a-mpeg4-thread.avi
71 71
764686 ./data/a-mpeg4-thread.avi
72 72
252d1e8cc1ee88eea693cebd6b4e7e53 *./data/out.yuv
73 73
stddev: 12.32 PSNR:26.31 bytes:7602176
74
88cfdda74f0488cf4a8324667a1ec9e8 *./data/a-mpeg4-Q.avi
74
a316960921c77d88817d857bbe19dccd *./data/a-mpeg4-Q.avi
75 75
899452 ./data/a-mpeg4-Q.avi
76 76
af59c063ed644c7dc4151a0a2debbddd *./data/out.yuv
77 77
stddev:  5.69 PSNR:33.00 bytes:7602176
78 78
28446a8cc5f1cfc337415f408ab67f0e *./data/a-mpeg4-PSP.mp4
79 79
407349 ./data/a-mpeg4-PSP.mp4
80
dd193b592a02864d612c64cbbf5e1258 *./data/a-error-mpeg4-adv.avi
80
40f1b11c7c5c114af109ef4ea6a7097d *./data/a-error-mpeg4-adv.avi
81 81
766682 ./data/a-error-mpeg4-adv.avi
82 82
e90b201e20563ec7817f5dc4276902ed *./data/out.yuv
83 83
stddev: 15.90 PSNR:24.09 bytes:7602176
84
adf36cbca712f8202d474cf1f99bdcd0 *./data/a-mpeg4-nr.avi
84
994c604f7fafc77f50acc61df7c20cd2 *./data/a-mpeg4-nr.avi
85 85
689772 ./data/a-mpeg4-nr.avi
86 86
79f4e8263e40822c0cbf35725f375b24 *./data/out.yuv
87 87
stddev:  7.03 PSNR:31.18 bytes:7602176
tests/libav.regression.ref
1 1
ffmpeg regression test
2
9f2252939564a3b735605be5e6575f04 *./data/b-libav.avi
2
ffe84c1d286255bb6856f864b8122b6a *./data/b-libav.avi
3 3
 342282 ./data/b-libav.avi
4 4
./data/b-libav.avi CRC=0xccab3a27
5 5
6f4dca897d9a009009798e434fe5f651 *./data/b-libav.asf
tests/rotozoom.regression.ref
59 59
6454196 ./data/a-huffyuv.avi
60 60
dde5895817ad9d219f79a52d0bdfb001 *./data/out.yuv
61 61
stddev:  0.00 PSNR:99.99 bytes:7602176
62
8375752d50a0a11c85370eebfb601d5d *./data/a-mpeg4-rc.avi
62
b25c4fd396faddd829d8ef5a31a1cce3 *./data/a-mpeg4-rc.avi
63 63
227618 ./data/a-mpeg4-rc.avi
64 64
addcb0b8e42d71c25a0590d10e8e41c6 *./data/out.yuv
65 65
stddev:  4.27 PSNR:35.51 bytes:7602176
66
49bb293a098ebf88870f663d590a02d9 *./data/a-mpeg4-adv.avi
66
390b43f0156d05f11489fe6cec2d7593 *./data/a-mpeg4-adv.avi
67 67
172526 ./data/a-mpeg4-adv.avi
68 68
e3445dab9a3fa83a0f86457e24cb0cea *./data/out.yuv
69 69
stddev:  4.84 PSNR:34.42 bytes:7602176
70
4b88839dd9696ff5500bea89b9ca66be *./data/a-mpeg4-thread.avi
70
c6c0c6884f4388bcb6eeba8046dd1e18 *./data/a-mpeg4-thread.avi
71 71
253268 ./data/a-mpeg4-thread.avi
72 72
d6f1714d6fe1f969fc4ca416c6f8ba6c *./data/out.yuv
73 73
stddev:  4.04 PSNR:35.98 bytes:7602176
74
bb7f7889f0694a1c499041f3ee5e234d *./data/a-mpeg4-Q.avi
74
e3297036902923727157b8d1b52cbc7e *./data/a-mpeg4-Q.avi
75 75
164998 ./data/a-mpeg4-Q.avi
76 76
b078f22c66083f0537bd3581509684d8 *./data/out.yuv
77 77
stddev:  4.01 PSNR:36.05 bytes:7602176
78 78
1a3e5c4b097c7609415248e235f39967 *./data/a-mpeg4-PSP.mp4
79 79
321922 ./data/a-mpeg4-PSP.mp4
80
74b9ddde044f90c8ee25042e9faaef68 *./data/a-error-mpeg4-adv.avi
80
a2adfb70459e8b2218756bac5e67c4c7 *./data/a-error-mpeg4-adv.avi
81 81
177212 ./data/a-error-mpeg4-adv.avi
82 82
9fa0943825f364d6fb700dc75cf5d8bb *./data/out.yuv
83 83
stddev:  9.71 PSNR:28.37 bytes:7602176
84
edf6bf425e6e5f78bdd1b992003aee9a *./data/a-mpeg4-nr.avi
84
b2722a6e5e7cce05665f221e15fd5202 *./data/a-mpeg4-nr.avi
85 85
154302 ./data/a-mpeg4-nr.avi
86 86
b69fc415185075bdb21bedeae03d20b8 *./data/out.yuv
87 87
stddev:  4.73 PSNR:34.62 bytes:7602176

Also available in: Unified diff