diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 1f0ea5cbcf..63accbb0cb 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -214,7 +214,7 @@ static int flv_write_header(AVFormatContext *s) put_amf_double(pb, video_enc->height); put_amf_string(pb, "videodatarate"); - put_amf_double(pb, s->bit_rate / 1024.0); + put_amf_double(pb, video_enc->bit_rate / 1024.0); put_amf_string(pb, "framerate"); put_amf_double(pb, framerate); @@ -224,6 +224,9 @@ static int flv_write_header(AVFormatContext *s) } if(audio_enc){ + put_amf_string(pb, "audiodatarate"); + put_amf_double(pb, audio_enc->bit_rate / 1024.0); + put_amf_string(pb, "audiosamplerate"); put_amf_double(pb, audio_enc->sample_rate); diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index df19c033b9..7db54e3e3d 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -134,7 +134,7 @@ stddev: 20.00 PSNR: 22.10 bytes: 7603200/ 7603200 1454536 ./tests/data/a-asv2.avi 0b310840a6d3970595983491687669df *./tests/data/asv2.vsynth.out.yuv stddev: 18.82 PSNR: 22.63 bytes: 7603200/ 7603200 -cbdb25fe5bb6a895baf9799b8ccb3038 *./tests/data/a-flv.flv +9f5091670b3352fbbb4c5dc2107af3f3 *./tests/data/a-flv.flv 649040 ./tests/data/a-flv.flv 40281942d6ee254f7d3027b8593b19be *./tests/data/flv.vsynth.out.yuv stddev: 8.06 PSNR: 29.99 bytes: 7603200/ 7603200 @@ -166,7 +166,7 @@ stddev: 1.72 PSNR: 43.36 bytes: 7603200/ 7603200 1359751 ./tests/data/a-svq1.mov 5bbd40268e94bdfb430abf57caa0c291 *./tests/data/svq1.vsynth.out.yuv stddev: 9.53 PSNR: 28.53 bytes: 7603200/ 7603200 -d6f92d41d739f95cc63ef8e6453c5011 *./tests/data/a-flashsv.flv +96bf684ca8dd9b9e07c0333a50aa1303 *./tests/data/a-flashsv.flv 14684984 ./tests/data/a-flashsv.flv 012717e7c928641410eaa6abaf126fdc *./tests/data/flashsv.vsynth.out.yuv stddev: 2.84 PSNR: 39.05 bytes: 7603200/ 7603200 @@ -197,8 +197,8 @@ ab11d9151644cbff27827b7e89f37aa9 *./tests/data/a-adpcm_yam.wav 264248 ./tests/data/a-adpcm_yam.wav e92cec8c07913ffb91ad2b11f79cdc00 *./tests/data/adpcm_yam.vsynth.out.wav stddev:18312.78 PSNR: 11.06 bytes: 1056812/ 1058444 -de1122d20d56c44cf49f028e25a67788 *./tests/data/a-adpcm_swf.flv -267073 ./tests/data/a-adpcm_swf.flv +7187eb46a4987b7ca9beafecffbda55d *./tests/data/a-adpcm_swf.flv +267097 ./tests/data/a-adpcm_swf.flv e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.vsynth.out.wav stddev: 934.28 PSNR: 36.91 bytes: 1056812/ 1058444 7781a016edfc242a39e4d65af02d861a *./tests/data/a-flac.flac diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index 5969c2c7f0..2ebc5203c8 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -18,7 +18,7 @@ c0cc2ae4df6a8b3df84986929a393116 *./tests/data/b-libav.ts 3dbacdc3fccb551f8ab54c32f648e7a8 *./tests/data/b-libav.ffm 380928 ./tests/data/b-libav.ffm ./tests/data/b-libav.ffm CRC=0x2b71a386 -f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv +8617c30b4e862199555fd75890473e66 *./tests/data/b-libav.flv 335833 ./tests/data/b-libav.flv ./tests/data/b-libav.flv CRC=0xe14e8847 af78858062599fcbba049e4a02588a15 *./tests/data/b-libav.mov diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index 9507a518f5..fc1ee659c7 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -134,7 +134,7 @@ stddev: 10.47 PSNR: 27.72 bytes: 7603200/ 7603200 789072 ./tests/data/a-asv2.avi 74a78015b64b2cf8cb9da2e44f508a69 *./tests/data/asv2.rotozoom.out.yuv stddev: 10.28 PSNR: 27.88 bytes: 7603200/ 7603200 -7163b470e93feb36b3f01e82168a3d31 *./tests/data/a-flv.flv +2edc92093d36506bcc0a5c0e17e86113 *./tests/data/a-flv.flv 131360 ./tests/data/a-flv.flv 8999c8264fb0941561f64c4a736e9d88 *./tests/data/flv.rotozoom.out.yuv stddev: 5.33 PSNR: 33.58 bytes: 7603200/ 7603200 @@ -166,7 +166,7 @@ stddev: 0.82 PSNR: 49.81 bytes: 7603200/ 7603200 766851 ./tests/data/a-svq1.mov aa03471dac3f49455a33a2b19fda1098 *./tests/data/svq1.rotozoom.out.yuv stddev: 3.23 PSNR: 37.92 bytes: 7603200/ 7603200 -2b93b46800f531ac088702e313d96c5f *./tests/data/a-flashsv.flv +0667077971e0cb63b5f49c580006e90e *./tests/data/a-flashsv.flv 12368953 ./tests/data/a-flashsv.flv 592b3321994e26a990deb3a0a1415de9 *./tests/data/flashsv.rotozoom.out.yuv stddev: 0.65 PSNR: 51.83 bytes: 7603200/ 7603200 @@ -197,8 +197,8 @@ ab11d9151644cbff27827b7e89f37aa9 *./tests/data/a-adpcm_yam.wav 264248 ./tests/data/a-adpcm_yam.wav e92cec8c07913ffb91ad2b11f79cdc00 *./tests/data/adpcm_yam.rotozoom.out.wav stddev:18312.78 PSNR: 11.06 bytes: 1056812/ 1058444 -de1122d20d56c44cf49f028e25a67788 *./tests/data/a-adpcm_swf.flv -267073 ./tests/data/a-adpcm_swf.flv +7187eb46a4987b7ca9beafecffbda55d *./tests/data/a-adpcm_swf.flv +267097 ./tests/data/a-adpcm_swf.flv e48b800e2d9be6afcd430d4f08a34eb6 *./tests/data/adpcm_swf.rotozoom.out.wav stddev: 934.28 PSNR: 36.91 bytes: 1056812/ 1058444 7781a016edfc242a39e4d65af02d861a *./tests/data/a-flac.flac diff --git a/tests/seek.regression.ref b/tests/seek.regression.ref index 549088d2e8..51b2cd6a7a 100644 --- a/tests/seek.regression.ref +++ b/tests/seek.regression.ref @@ -184,54 +184,54 @@ ret: 0 st: 0 dts:0.511995 pts:0.511995 pos:8248 size:4096 flags:1 ret:-1 st:-1 ts:-0.645825 flags:1 ---------------- tests/data/a-adpcm_swf.flv -ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:184 size:2053 flags:1 +ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:208 size:2053 flags:1 ret: 0 st:-1 ts:-1.000000 flags:0 -ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:184 size:2053 flags:1 +ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:208 size:2053 flags:1 ret: 0 st:-1 ts:1.894167 flags:1 -ret: 0 st: 0 dts:1.858000 pts:1.858000 pos:82944 size:2053 flags:1 +ret: 0 st: 0 dts:1.858000 pts:1.858000 pos:82968 size:2053 flags:1 ret: 0 st: 0 ts:0.788000 flags:0 -ret: 0 st: 0 dts:0.789000 pts:0.789000 pos:35357 size:2053 flags:1 +ret: 0 st: 0 dts:0.789000 pts:0.789000 pos:35381 size:2053 flags:1 ret:-1 st: 0 ts:-0.317000 flags:1 ret: 0 st:-1 ts:2.576668 flags:0 -ret: 0 st: 0 dts:2.601000 pts:2.601000 pos:116048 size:2053 flags:1 +ret: 0 st: 0 dts:2.601000 pts:2.601000 pos:116072 size:2053 flags:1 ret: 0 st:-1 ts:1.470835 flags:1 -ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:64323 size:2053 flags:1 +ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:64347 size:2053 flags:1 ret: 0 st: 0 ts:0.365000 flags:0 -ret: 0 st: 0 dts:0.372000 pts:0.372000 pos:16736 size:2053 flags:1 +ret: 0 st: 0 dts:0.372000 pts:0.372000 pos:16760 size:2053 flags:1 ret:-1 st: 0 ts:-0.741000 flags:1 ret: 0 st:-1 ts:2.153336 flags:0 -ret: 0 st: 0 dts:2.183000 pts:2.183000 pos:97427 size:2053 flags:1 +ret: 0 st: 0 dts:2.183000 pts:2.183000 pos:97451 size:2053 flags:1 ret: 0 st:-1 ts:1.047503 flags:1 -ret: 0 st: 0 dts:1.022000 pts:1.022000 pos:45702 size:2053 flags:1 +ret: 0 st: 0 dts:1.022000 pts:1.022000 pos:45726 size:2053 flags:1 ret: 0 st: 0 ts:-0.058000 flags:0 -ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:184 size:2053 flags:1 +ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:208 size:2053 flags:1 ret: 0 st: 0 ts:2.836000 flags:1 -ret: 0 st: 0 dts:2.833000 pts:2.833000 pos:126393 size:2053 flags:1 +ret: 0 st: 0 dts:2.833000 pts:2.833000 pos:126417 size:2053 flags:1 ret: 0 st:-1 ts:1.730004 flags:0 -ret: 0 st: 0 dts:1.765000 pts:1.765000 pos:78806 size:2053 flags:1 +ret: 0 st: 0 dts:1.765000 pts:1.765000 pos:78830 size:2053 flags:1 ret: 0 st:-1 ts:0.624171 flags:1 -ret: 0 st: 0 dts:0.604000 pts:0.604000 pos:27081 size:2053 flags:1 +ret: 0 st: 0 dts:0.604000 pts:0.604000 pos:27105 size:2053 flags:1 ret: 0 st: 0 ts:-0.482000 flags:0 -ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:184 size:2053 flags:1 +ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:208 size:2053 flags:1 ret: 0 st: 0 ts:2.413000 flags:1 -ret: 0 st: 0 dts:2.368000 pts:2.368000 pos:105703 size:2053 flags:1 +ret: 0 st: 0 dts:2.368000 pts:2.368000 pos:105727 size:2053 flags:1 ret: 0 st:-1 ts:1.306672 flags:0 -ret: 0 st: 0 dts:1.347000 pts:1.347000 pos:60185 size:2053 flags:1 +ret: 0 st: 0 dts:1.347000 pts:1.347000 pos:60209 size:2053 flags:1 ret: 0 st:-1 ts:0.200839 flags:1 -ret: 0 st: 0 dts:0.186000 pts:0.186000 pos:8460 size:2053 flags:1 +ret: 0 st: 0 dts:0.186000 pts:0.186000 pos:8484 size:2053 flags:1 ret: 0 st: 0 ts:-0.905000 flags:0 -ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:184 size:2053 flags:1 +ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:208 size:2053 flags:1 ret: 0 st: 0 ts:1.989000 flags:1 -ret: 0 st: 0 dts:1.950000 pts:1.950000 pos:87082 size:2053 flags:1 +ret: 0 st: 0 dts:1.950000 pts:1.950000 pos:87106 size:2053 flags:1 ret: 0 st:-1 ts:0.883340 flags:0 -ret: 0 st: 0 dts:0.929000 pts:0.929000 pos:41564 size:2053 flags:1 +ret: 0 st: 0 dts:0.929000 pts:0.929000 pos:41588 size:2053 flags:1 ret:-1 st:-1 ts:-0.222493 flags:1 ret: 0 st: 0 ts:2.672000 flags:0 -ret: 0 st: 0 dts:2.694000 pts:2.694000 pos:120186 size:2053 flags:1 +ret: 0 st: 0 dts:2.694000 pts:2.694000 pos:120210 size:2053 flags:1 ret: 0 st: 0 ts:1.566000 flags:1 -ret: 0 st: 0 dts:1.533000 pts:1.533000 pos:68461 size:2053 flags:1 +ret: 0 st: 0 dts:1.533000 pts:1.533000 pos:68485 size:2053 flags:1 ret: 0 st:-1 ts:0.460008 flags:0 -ret: 0 st: 0 dts:0.464000 pts:0.464000 pos:20874 size:2053 flags:1 +ret: 0 st: 0 dts:0.464000 pts:0.464000 pos:20898 size:2053 flags:1 ret:-1 st:-1 ts:-0.645825 flags:1 ---------------- tests/data/a-adpcm_yam.wav