Right now those muxers use the default timebase in all cases(1/90000).
This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.
Obviously changes the results of many FATE tests.
---
The full patch is about 2MB large, so I cut off most of it.
---
libavformat/framecrcenc.c | 2 +
libavformat/internal.h | 5 +
libavformat/md5enc.c | 2 +
libavformat/utils.c | 9 +
tests/ref/fate/4xm-1 | 28 +-
tests/ref/fate/4xm-2 | 346 +-
tests/ref/fate/8bps | 66 +-
tests/ref/fate/aasc | 44 +-
tests/ref/fate/adpcm-ea-mad-ea-r1 | 378 ++--
tests/ref/fate/adpcm-ea-tqi | 98 +-
tests/ref/fate/adpcm-psx-str-v3 | 72 +-
tests/ref/fate/adpcm-thp | 282 +-
tests/ref/fate/alg-mm | 60 +-
tests/ref/fate/amv | 636 ++--
tests/ref/fate/ansi | 32 +-
tests/ref/fate/armovie-escape124 | 204 +-
tests/ref/fate/auravision-v1 | 46 +-
tests/ref/fate/auravision-v2 | 2 +-
tests/ref/fate/bethsoft-vid | 278 +-
tests/ref/fate/bfi | 224 +-
tests/ref/fate/bink-video | 38 +-
tests/ref/fate/bmv | 80 +-
tests/ref/fate/cdgraphics | 598 ++--
tests/ref/fate/cljr | 70 +-
tests/ref/fate/corepng | 70 +-
tests/ref/fate/creatureshock-avs | 180 +-
tests/ref/fate/cscd | 414 ++--
tests/ref/fate/cvid-grayscale | 302 +-
tests/ref/fate/cvid-palette | 110 +-
tests/ref/fate/cvid-partial | 154 +-
tests/ref/fate/cyberia-c93 | 80 +-
tests/ref/fate/cyuv | 298 +-
tests/ref/fate/delphine-cin | 362 ++--
tests/ref/fate/deluxepaint-anm | 244 +-
tests/ref/fate/dfa1 | 48 +-
tests/ref/fate/dfa10 | 14 +-
tests/ref/fate/dfa11 | 16 +-
tests/ref/fate/dfa2 | 32 +-
tests/ref/fate/dfa3 | 18 +-
tests/ref/fate/dfa4 | 24 +-
tests/ref/fate/dfa5 | 28 +-
tests/ref/fate/dfa6 | 22 +-
tests/ref/fate/dfa7 | 22 +-
tests/ref/fate/dfa8 | 70 +-
tests/ref/fate/dfa9 | 10 +-
tests/ref/fate/dpcm-idroq | 750 +++---
tests/ref/fate/dxa-feeble | 124 +-
tests/ref/fate/dxa-scummvm | 22 +-
tests/ref/fate/ea-cmv | 386 ++--
tests/ref/fate/ea-dct | 530 ++--
tests/ref/fate/ea-mad-pcm-planar | 580 ++--
tests/ref/fate/ea-tgq | 554 ++--
tests/ref/fate/ea-tgv-ima-ea-eacs | 184 +-
tests/ref/fate/ea-tgv-ima-ea-sead | 170 +-
tests/ref/fate/ea-vp60 | 264 +-
tests/ref/fate/ea-vp61 | 238 +-
tests/ref/fate/film-cvid-pcm-stereo-8bit | 274 +-
tests/ref/fate/flic-af11-palette-change | 230 +-
tests/ref/fate/flic-af12 | 52 +-
tests/ref/fate/flic-magiccarpet | 82 +-
tests/ref/fate/fraps-v0 | 38 +-
tests/ref/fate/fraps-v2 | 18 +-
tests/ref/fate/fraps-v3 | 16 +-
tests/ref/fate/fraps-v4 | 12 +-
tests/ref/fate/fraps-v5 | 114 +-
tests/ref/fate/frwu | 18 +-
tests/ref/fate/g722dec-1 | 332 +-
tests/ref/fate/gsm-ms | 176 +-
tests/ref/fate/gsm-toast | 998 +++---
tests/ref/fate/h264-conformance-aud_mw_e | 198 +-
tests/ref/fate/h264-conformance-ba1_ft_c | 596 ++--
tests/ref/fate/h264-conformance-ba1_sony_d | 32 +-
tests/ref/fate/h264-conformance-ba2_sony_f | 598 ++--
tests/ref/fate/h264-conformance-ba3_sva_c | 64 +-
tests/ref/fate/h264-conformance-ba_mw_d | 198 +-
tests/ref/fate/h264-conformance-bamq1_jvc_c | 58 +-
tests/ref/fate/h264-conformance-bamq2_jvc_c | 58 +-
tests/ref/fate/h264-conformance-banm_mw_d | 198 +-
tests/ref/fate/h264-conformance-basqp1_sony_c | 6 +-
tests/ref/fate/h264-conformance-caba1_sony_d | 98 +-
tests/ref/fate/h264-conformance-caba1_sva_b | 32 +-
tests/ref/fate/h264-conformance-caba2_sony_e | 598 ++--
tests/ref/fate/h264-conformance-caba2_sva_b | 32 +-
tests/ref/fate/h264-conformance-caba3_sony_c | 598 ++--
tests/ref/fate/h264-conformance-caba3_sva_b | 64 +-
tests/ref/fate/h264-conformance-caba3_toshiba_e | 598 ++--
.../ref/fate/h264-conformance-cabac_mot_fld0_full | 58 +-
.../ref/fate/h264-conformance-cabac_mot_frm0_full | 58 +-
.../fate/h264-conformance-cabac_mot_mbaff0_full | 58 +-
.../fate/h264-conformance-cabac_mot_picaff0_full | 58 +-
tests/ref/fate/h264-conformance-cabaci3_sony_b | 598 ++--
tests/ref/fate/h264-conformance-cabast3_sony_e | 48 +-
tests/ref/fate/h264-conformance-cabastbr3_sony_b | 48 +-
tests/ref/fate/h264-conformance-cabref3_sand_d | 98 +-
tests/ref/fate/h264-conformance-cacqp3_sony_d | 98 +-
tests/ref/fate/h264-conformance-cafi1_sva_c | 64 +-
tests/ref/fate/h264-conformance-cama1_sony_c | 8 +-
tests/ref/fate/h264-conformance-cama1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-cama1_vtc_c | 6 +-
tests/ref/fate/h264-conformance-cama2_vtc_b | 6 +-
tests/ref/fate/h264-conformance-cama3_sand_e | 98 +-
tests/ref/fate/h264-conformance-cama3_vtc_b | 6 +-
tests/ref/fate/h264-conformance-camaci3_sony_c | 32 +-
tests/ref/fate/h264-conformance-camanl1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-camanl2_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-camanl3_sand_e | 98 +-
tests/ref/fate/h264-conformance-camasl3_sony_b | 32 +-
tests/ref/fate/h264-conformance-camp_mot_mbaff_l30 | 58 +-
tests/ref/fate/h264-conformance-camp_mot_mbaff_l31 | 58 +-
tests/ref/fate/h264-conformance-canl1_sony_e | 98 +-
tests/ref/fate/h264-conformance-canl1_sva_b | 32 +-
tests/ref/fate/h264-conformance-canl1_toshiba_g | 598 ++--
tests/ref/fate/h264-conformance-canl2_sony_e | 598 ++--
tests/ref/fate/h264-conformance-canl2_sva_b | 32 +-
tests/ref/fate/h264-conformance-canl3_sony_c | 598 ++--
tests/ref/fate/h264-conformance-canl3_sva_b | 32 +-
tests/ref/fate/h264-conformance-canl4_sva_b | 64 +-
tests/ref/fate/h264-conformance-canlma2_sony_c | 32 +-
tests/ref/fate/h264-conformance-canlma3_sony_c | 32 +-
tests/ref/fate/h264-conformance-capa1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-capama3_sand_f | 98 +-
tests/ref/fate/h264-conformance-capcm1_sand_e | 58 +-
tests/ref/fate/h264-conformance-capcmnl1_sand_e | 58 +-
tests/ref/fate/h264-conformance-capm3_sony_d | 598 ++--
tests/ref/fate/h264-conformance-caqp1_sony_b | 98 +-
.../fate/h264-conformance-cavlc_mot_fld0_full_b | 58 +-
.../fate/h264-conformance-cavlc_mot_frm0_full_b | 58 +-
.../fate/h264-conformance-cavlc_mot_mbaff0_full_b | 58 +-
.../fate/h264-conformance-cavlc_mot_picaff0_full_b | 58 +-
tests/ref/fate/h264-conformance-cawp1_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-cawp5_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-ci1_ft_b | 580 ++--
tests/ref/fate/h264-conformance-ci_mw_d | 198 +-
tests/ref/fate/h264-conformance-cvbs3_sony_c | 598 ++--
tests/ref/fate/h264-conformance-cvcanlma2_sony_c | 32 +-
tests/ref/fate/h264-conformance-cvfi1_sony_d | 32 +-
tests/ref/fate/h264-conformance-cvfi1_sva_c | 12 +-
tests/ref/fate/h264-conformance-cvfi2_sony_h | 32 +-
tests/ref/fate/h264-conformance-cvfi2_sva_c | 24 +-
tests/ref/fate/h264-conformance-cvma1_sony_d | 8 +-
tests/ref/fate/h264-conformance-cvma1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-cvmanl1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-cvmanl2_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-cvmapaqp3_sony_e | 14 +-
tests/ref/fate/h264-conformance-cvmaqp2_sony_g | 32 +-
tests/ref/fate/h264-conformance-cvmaqp3_sony_d | 32 +-
tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b | 58 +-
tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b | 58 +-
tests/ref/fate/h264-conformance-cvnlfi1_sony_c | 32 +-
tests/ref/fate/h264-conformance-cvnlfi2_sony_h | 32 +-
tests/ref/fate/h264-conformance-cvpa1_toshiba_b | 178 +-
tests/ref/fate/h264-conformance-cvpcmnl1_sva_c | 58 +-
tests/ref/fate/h264-conformance-cvpcmnl2_sva_c | 2 +-
tests/ref/fate/h264-conformance-cvwp1_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-cvwp2_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-cvwp3_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-cvwp5_toshiba_e | 178 +-
tests/ref/fate/h264-conformance-fi1_sony_e | 32 +-
.../fate/h264-conformance-frext-alphaconformanceg | 84 +-
tests/ref/fate/h264-conformance-frext-bcrm_freh10 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh11 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh3 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh4 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh5 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh8 | 198 +-
tests/ref/fate/h264-conformance-frext-brcm_freh9 | 198 +-
tests/ref/fate/h264-conformance-frext-freh12_b | 198 +-
tests/ref/fate/h264-conformance-frext-freh1_b | 198 +-
tests/ref/fate/h264-conformance-frext-freh2_b | 198 +-
tests/ref/fate/h264-conformance-frext-freh6 | 198 +-
tests/ref/fate/h264-conformance-frext-freh7_b | 198 +-
.../ref/fate/h264-conformance-frext-frext01_jvc_d | 30 +-
.../ref/fate/h264-conformance-frext-frext02_jvc_c | 30 +-
.../fate/h264-conformance-frext-frext1_panasonic_c | 14 +-
.../fate/h264-conformance-frext-frext2_panasonic_b | 28 +-
.../fate/h264-conformance-frext-frext3_panasonic_d | 20 +-
.../fate/h264-conformance-frext-frext4_panasonic_a | 18 +-
.../fate/h264-conformance-frext-frext_mmco4_sony_b | 118 +-
tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b | 18 +-
tests/ref/fate/h264-conformance-frext-hcafr1_hhi_c | 18 +-
tests/ref/fate/h264-conformance-frext-hcafr2_hhi_a | 18 +-
tests/ref/fate/h264-conformance-frext-hcafr3_hhi_a | 18 +-
tests/ref/fate/h264-conformance-frext-hcafr4_hhi_a | 18 +-
.../ref/fate/h264-conformance-frext-hcamff1_hhi_b | 18 +-
tests/ref/fate/h264-conformance-frext-hpca_brcm_c | 598 ++--
.../ref/fate/h264-conformance-frext-hpcadq_brcm_b | 598 ++--
.../ref/fate/h264-conformance-frext-hpcafl_bcrm_c | 598 ++--
.../fate/h264-conformance-frext-hpcaflnl_bcrm_c | 598 ++--
.../ref/fate/h264-conformance-frext-hpcalq_brcm_b | 598 ++--
.../fate/h264-conformance-frext-hpcamapalq_bcrm_b | 598 ++--
.../fate/h264-conformance-frext-hpcamolq_brcm_b | 198 +-
.../ref/fate/h264-conformance-frext-hpcanl_brcm_c | 598 ++--
.../fate/h264-conformance-frext-hpcaq2lq_brcm_b | 198 +-
tests/ref/fate/h264-conformance-frext-hpcv_brcm_a | 598 ++--
.../ref/fate/h264-conformance-frext-hpcvfl_bcrm_a | 598 ++--
.../fate/h264-conformance-frext-hpcvflnl_bcrm_a | 598 ++--
.../fate/h264-conformance-frext-hpcvmolq_brcm_b | 198 +-
.../ref/fate/h264-conformance-frext-hpcvnl_brcm_a | 598 ++--
.../h264-conformance-frext-pph10i1_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i2_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i3_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i4_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i5_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i6_panasonic_a | 18 +-
.../h264-conformance-frext-pph10i7_panasonic_a | 18 +-
tests/ref/fate/h264-conformance-hcbp2_hhi_a | 498 ++--
tests/ref/fate/h264-conformance-hcmp1_hhi_a | 498 ++--
tests/ref/fate/h264-conformance-ls_sva_d | 3398 ++++++++++----------
tests/ref/fate/h264-conformance-midr_mw_d | 198 +-
tests/ref/fate/h264-conformance-mps_mw_a | 298 +-
tests/ref/fate/h264-conformance-mr1_bt_a | 122 +-
tests/ref/fate/h264-conformance-mr1_mw_a | 298 +-
tests/ref/fate/h264-conformance-mr2_mw_a | 598 ++--
tests/ref/fate/h264-conformance-mr2_tandberg_e | 598 ++--
tests/ref/fate/h264-conformance-mr3_tandberg_b | 598 ++--
tests/ref/fate/h264-conformance-mr4_tandberg_c | 598 ++--
tests/ref/fate/h264-conformance-mr5_tandberg_c | 598 ++--
tests/ref/fate/h264-conformance-mr6_bt_b | 118 +-
tests/ref/fate/h264-conformance-mr7_bt_b | 118 +-
tests/ref/fate/h264-conformance-mr8_bt_b | 114 +-
tests/ref/fate/h264-conformance-mr9_bt_b | 114 +-
tests/ref/fate/h264-conformance-mv1_brcm_d | 512 ++--
tests/ref/fate/h264-conformance-nl1_sony_d | 32 +-
tests/ref/fate/h264-conformance-nl2_sony_h | 598 ++--
tests/ref/fate/h264-conformance-nl3_sva_e | 64 +-
tests/ref/fate/h264-conformance-nlmq1_jvc_c | 58 +-
tests/ref/fate/h264-conformance-nlmq2_jvc_c | 58 +-
tests/ref/fate/h264-conformance-nrf_mw_e | 198 +-
tests/ref/fate/h264-conformance-sharp_mp_field_1_b | 28 +-
tests/ref/fate/h264-conformance-sharp_mp_field_2_b | 28 +-
tests/ref/fate/h264-conformance-sharp_mp_field_3_b | 28 +-
tests/ref/fate/h264-conformance-sharp_mp_paff_1r2 | 28 +-
tests/ref/fate/h264-conformance-sharp_mp_paff_2r | 28 +-
tests/ref/fate/h264-conformance-sl1_sva_b | 64 +-
tests/ref/fate/h264-conformance-sva_ba1_b | 32 +-
tests/ref/fate/h264-conformance-sva_ba2_d | 32 +-
tests/ref/fate/h264-conformance-sva_base_b | 32 +-
tests/ref/fate/h264-conformance-sva_cl1_e | 98 +-
tests/ref/fate/h264-conformance-sva_fm1_e | 32 +-
tests/ref/fate/h264-conformance-sva_nl1_b | 32 +-
tests/ref/fate/h264-conformance-sva_nl2_e | 32 +-
tests/ref/fate/h264-extreme-plane-pred | 198 +-
tests/ref/fate/h264-interlace-crop | 4 +-
tests/ref/fate/h264-lossless | 18 +-
tests/ref/fate/id-cin-video | 206 +-
tests/ref/fate/indeo2 | 258 +-
tests/ref/fate/indeo3 | 78 +-
tests/ref/fate/indeo4 | 198 +-
tests/ref/fate/indeo5 | 266 +-
tests/ref/fate/interplay-mve-16bit | 254 +-
tests/ref/fate/interplay-mve-8bit | 464 ++--
tests/ref/fate/kmvc | 148 +-
tests/ref/fate/lmlm4-demux | 178 +-
tests/ref/fate/loco-rgb | 8 +-
tests/ref/fate/loco-yuy2 | 4 +-
tests/ref/fate/mimic | 150 +-
tests/ref/fate/mjpegb | 18 +-
tests/ref/fate/motionpixels | 220 +-
tests/ref/fate/mpeg2-field-enc | 60 +-
tests/ref/fate/msmpeg4v1 | 98 +-
tests/ref/fate/msrle-8bit | 56 +-
tests/ref/fate/msvideo1-16bit | 58 +-
tests/ref/fate/msvideo1-8bit | 60 +-
tests/ref/fate/mtv | 266 +-
tests/ref/fate/mxf-demux | 190 +-
tests/ref/fate/nc-demux | 180 +-
tests/ref/fate/nsv-demux | 340 +-
tests/ref/fate/nuv | 50 +-
tests/ref/fate/pcm_dvd | 244 +-
tests/ref/fate/prores-422 | 2 +-
tests/ref/fate/prores-422_hq | 2 +-
tests/ref/fate/prores-422_lt | 2 +-
tests/ref/fate/prores-422_proxy | 2 +-
tests/ref/fate/prores-alpha | 2 +-
tests/ref/fate/psx-str | 396 ++--
tests/ref/fate/psx-str-v3-mdec | 116 +-
tests/ref/fate/qpeg | 198 +-
tests/ref/fate/qtrle-16bit | 164 +-
tests/ref/fate/qtrle-1bit | 210 +-
tests/ref/fate/qtrle-24bit | 66 +-
tests/ref/fate/qtrle-2bit | 210 +-
tests/ref/fate/qtrle-32bit | 50 +-
tests/ref/fate/qtrle-4bit | 74 +-
tests/ref/fate/qtrle-8bit | 332 +-
tests/ref/fate/quickdraw | 2 +-
tests/ref/fate/r210 | 4 +-
tests/ref/fate/real-rv40 | 478 ++--
tests/ref/fate/redcode-demux | 6 +-
tests/ref/fate/rl2 | 214 +-
tests/ref/fate/rpza | 58 +-
tests/ref/fate/rv30 | 216 +-
tests/ref/fate/sierra-vmd | 660 ++--
tests/ref/fate/siff | 74 +-
tests/ref/fate/smacker | 368 ++--
tests/ref/fate/smc | 238 +-
tests/ref/fate/smjpeg | 842 +++---
tests/ref/fate/sp5x | 34 +-
tests/ref/fate/svq1 | 298 +-
tests/ref/fate/svq3 | 358 +-
tests/ref/fate/tiertex-seq | 192 +-
tests/ref/fate/tmv | 436 ++--
tests/ref/fate/truemotion1-15 | 432 ++--
tests/ref/fate/truemotion1-24 | 82 +-
tests/ref/fate/truemotion2 | 58 +-
tests/ref/fate/tscc-15bit | 476 ++--
tests/ref/fate/tscc-32bit | 310 +-
tests/ref/fate/txd-16bpp | 20 +-
tests/ref/fate/ulti | 122 +-
tests/ref/fate/utvideo_rgb_left | 6 +-
tests/ref/fate/utvideo_rgb_median | 8 +-
tests/ref/fate/utvideo_rgba_left | 8 +-
tests/ref/fate/utvideo_rgba_median | 8 +-
tests/ref/fate/utvideo_yuv420_left | 12 +-
tests/ref/fate/utvideo_yuv420_median | 6 +-
tests/ref/fate/utvideo_yuv422_left | 6 +-
tests/ref/fate/utvideo_yuv422_median | 6 +-
tests/ref/fate/vble | 6 +-
tests/ref/fate/vc1-ism | 238 +-
tests/ref/fate/vc1_sa00040 | 28 +-
tests/ref/fate/vc1_sa00050 | 58 +-
tests/ref/fate/vc1_sa10091 | 58 +-
tests/ref/fate/vc1_sa20021 | 118 +-
tests/ref/fate/vcr1 | 254 +-
tests/ref/fate/videoxl | 78 +-
tests/ref/fate/vmnc-16bit | 382 ++--
tests/ref/fate/vmnc-32bit | 96 +-
tests/ref/fate/vp3-coeff-level64 | 14 +-
tests/ref/fate/vp31 | 226 +-
tests/ref/fate/vp5 | 490 ++--
tests/ref/fate/vp6a | 184 +-
tests/ref/fate/vp6f | 346 +-
tests/ref/fate/vp8-sign-bias | 16 +-
tests/ref/fate/vp8-test-vector-001 | 56 +-
tests/ref/fate/vp8-test-vector-002 | 96 +-
tests/ref/fate/vp8-test-vector-003 | 96 +-
tests/ref/fate/vp8-test-vector-004 | 56 +-
tests/ref/fate/vp8-test-vector-005 | 96 +-
tests/ref/fate/vp8-test-vector-006 | 94 +-
tests/ref/fate/vp8-test-vector-007 | 56 +-
tests/ref/fate/vp8-test-vector-008 | 2 +-
tests/ref/fate/vp8-test-vector-009 | 96 +-
tests/ref/fate/vp8-test-vector-010 | 112 +-
tests/ref/fate/vp8-test-vector-011 | 56 +-
tests/ref/fate/vp8-test-vector-012 | 56 +-
tests/ref/fate/vp8-test-vector-013 | 56 +-
tests/ref/fate/vp8-test-vector-014 | 96 +-
tests/ref/fate/vp8-test-vector-015 | 518 ++--
tests/ref/fate/vp8-test-vector-016 | 56 +-
tests/ref/fate/vp8-test-vector-017 | 56 +-
tests/ref/fate/vqa-cc | 152 +-
tests/ref/fate/vqf-demux | 2 +-
tests/ref/fate/wc3movie-xan | 136 +-
tests/ref/fate/wmv8-drm | 258 +-
tests/ref/fate/wmv8-drm-nodec | 296 +-
tests/ref/fate/wnv1 | 170 +-
tests/ref/fate/wtv-demux | 278 +-
tests/ref/fate/xmv-demux | 358 +-
tests/ref/fate/xxan-wc4 | 40 +-
tests/ref/fate/yop | 12 +-
tests/ref/fate/zmbv-15bit | 316 +-
tests/ref/fate/zmbv-16bit | 316 +-
tests/ref/fate/zmbv-32bit | 316 +-
tests/ref/fate/zmbv-8bit | 548 ++--
363 files changed, 33005 insertions(+), 32987 deletions(-)
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index d845e79..6153a28 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -21,6 +21,7 @@
#include "libavutil/adler32.h"
#include "avformat.h"
+#include "internal.h"
static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
@@ -39,6 +40,7 @@ AVOutputFormat ff_framecrc_muxer = {
.extensions = "",
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
+ .write_header = ff_set_tb_from_codec,
.write_packet = framecrc_write_packet,
.flags = AVFMT_VARIABLE_FPS,
};
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 559e710..1f7983c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -307,4 +307,9 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels,
uint64_t channel_layout, int32_t sample_rate,
int32_t width, int32_t height);
+/**
+ * Set the timebase for each stream from the corresponding codec timebase.
+ */
+void ff_set_tb_from_codec(AVFormatContext *s);
+
#endif /* AVFORMAT_INTERNAL_H */
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 4509c18..10b81c5 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -21,6 +21,7 @@
#include "libavutil/md5.h"
#include "avformat.h"
+#include "internal.h"
#define PRIVSIZE 512
@@ -102,6 +103,7 @@ AVOutputFormat ff_framemd5_muxer = {
.priv_data_size = PRIVSIZE,
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
+ .write_header = ff_set_tb_from_codec,
.write_packet = framemd5_write_packet,
.flags = AVFMT_VARIABLE_FPS,
};
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e10348d..f8043b5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3883,3 +3883,12 @@ const struct AVCodecTag
*avformat_get_riff_audio_tags(void)
{
return ff_codec_wav_tags;
}
+
+void ff_set_tb_from_codec(AVFormatContext *s)
+{
+ int i;
+ for (i = 0; i < s->nb_streams; i++) {
+ AVStream *st = s->streams[i];
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num,
st->codec->time_base.den);
+ }
+}
diff --git a/tests/ref/fate/4xm-1 b/tests/ref/fate/4xm-1
index 5e66dcc..23938cc 100644
--- a/tests/ref/fate/4xm-1
+++ b/tests/ref/fate/4xm-1
@@ -1,15 +1,15 @@
0, 0, 921600, 0xd08f97c7
-0, 6000, 921600, 0xc433a85b
-0, 12000, 921600, 0x7ffeee42
-0, 18000, 921600, 0xc0ad9f52
-0, 24000, 921600, 0xb0235112
-0, 30000, 921600, 0xcbdd9805
-0, 36000, 921600, 0x5468bdb9
-0, 42000, 921600, 0x2f0c63fd
-0, 48000, 921600, 0xf1de04f0
-0, 54000, 921600, 0x95709ce2
-0, 60000, 921600, 0x69037c4a
-0, 66000, 921600, 0x513f8a98
-0, 72000, 921600, 0x55b82fa1
-0, 78000, 921600, 0x5c8ace28
-0, 84000, 921600, 0xb019770a
+0, 1, 921600, 0xc433a85b
+0, 2, 921600, 0x7ffeee42
+0, 3, 921600, 0xc0ad9f52
+0, 4, 921600, 0xb0235112
+0, 5, 921600, 0xcbdd9805
+0, 6, 921600, 0x5468bdb9
+0, 7, 921600, 0x2f0c63fd
+0, 8, 921600, 0xf1de04f0
+0, 9, 921600, 0x95709ce2
+0, 10, 921600, 0x69037c4a
+0, 11, 921600, 0x513f8a98
+0, 12, 921600, 0x55b82fa1
+0, 13, 921600, 0x5c8ace28
+0, 14, 921600, 0xb019770a
--
1.7.7.3
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel