diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-14 17:11:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-18 18:22:04 +0100 |
commit | 56b6909b395e4d54a356a0274a5e4cba79bab33b (patch) | |
tree | 831f658a50964362e2943765a237f4b50dc6b6c2 | |
parent | c6f59b95c529baf2ea6729ab9089fddce3ddd86a (diff) | |
download | ffmpeg-56b6909b395e4d54a356a0274a5e4cba79bab33b.tar.gz |
movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Other software does not store it in this case, and the information
is provided by the codec stream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 405cc0d9052079307b2b4188c396ae30c8e9108b)
Conflicts:
tests/ref/lavf/mov
-rw-r--r-- | libavformat/movenc.c | 7 | ||||
-rw-r--r-- | tests/ref/lavf/mov | 16 | ||||
-rw-r--r-- | tests/ref/seek/lavf-mov | 44 | ||||
-rw-r--r-- | tests/ref/vsynth/vsynth1-dnxhd-1080i | 4 | ||||
-rw-r--r-- | tests/ref/vsynth/vsynth1-mpeg4 | 4 | ||||
-rw-r--r-- | tests/ref/vsynth/vsynth2-dnxhd-1080i | 4 | ||||
-rw-r--r-- | tests/ref/vsynth/vsynth2-mpeg4 | 4 |
7 files changed, 43 insertions, 40 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index bab8314ce5..2ee21e544d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1133,8 +1133,11 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) else if (track->vos_len > 0) mov_write_glbl_tag(pb, track); - if (track->enc->field_order != AV_FIELD_UNKNOWN) - mov_write_fiel_tag(pb, track); + if (track->enc->codec_id != AV_CODEC_ID_H264 && + track->enc->codec_id != AV_CODEC_ID_MPEG4 && + track->enc->codec_id != AV_CODEC_ID_DNXHD) + if (track->enc->field_order != AV_FIELD_UNKNOWN) + mov_write_fiel_tag(pb, track); if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num && track->enc->sample_aspect_ratio.den != track->enc->sample_aspect_ratio.num) { diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov index 210c88a015..4554ea65d9 100644 --- a/tests/ref/lavf/mov +++ b/tests/ref/lavf/mov @@ -1,12 +1,12 @@ -821cbbb6166b1d1117585fa4bb167a8e *./tests/data/lavf/lavf.mov -367375 ./tests/data/lavf/lavf.mov +fcbe7806047914d9751fd9053009df69 *./tests/data/lavf/lavf.mov +367365 ./tests/data/lavf/lavf.mov ./tests/data/lavf/lavf.mov CRC=0xb2f59ab4 -f8e597c1ca2dddd581c82fef7700ae33 *./tests/data/lavf/lavf.mov -358465 ./tests/data/lavf/lavf.mov +72eac0051107a16e41d5263dab640f26 *./tests/data/lavf/lavf.mov +358455 ./tests/data/lavf/lavf.mov ./tests/data/lavf/lavf.mov CRC=0xb2f59ab4 -98aadee64774fea3eb59288b44144547 *./tests/data/lavf/lavf.mov -377623 ./tests/data/lavf/lavf.mov +cbc587335946df1f08d838f48ef396f0 *./tests/data/lavf/lavf.mov +377613 ./tests/data/lavf/lavf.mov ./tests/data/lavf/lavf.mov CRC=0xc882139b -2561698a1e4ba55e03fd9ebdba743bb0 *./tests/data/lavf/lavf.mov -357847 ./tests/data/lavf/lavf.mov +7c932d24837f46ef57d3e40a61331565 *./tests/data/lavf/lavf.mov +357837 ./tests/data/lavf/lavf.mov ./tests/data/lavf/lavf.mov CRC=0xb2f59ab4 diff --git a/tests/ref/seek/lavf-mov b/tests/ref/seek/lavf-mov index c7278bd03e..9563a0d3a5 100644 --- a/tests/ref/seek/lavf-mov +++ b/tests/ref/seek/lavf-mov @@ -1,48 +1,48 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326941 size: 1024 +ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326931 size: 1024 ret: 0 st: 0 flags:0 ts: 0.788359 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327965 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327955 size: 27834 ret: 0 st: 0 flags:1 ts:-0.317500 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret:-1 st: 1 flags:0 ts: 2.576667 ret: 0 st: 1 flags:1 ts: 1.470839 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327965 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327955 size: 27834 ret: 0 st:-1 flags:0 ts: 0.365002 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165219 size: 27925 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165209 size: 27925 ret: 0 st:-1 flags:1 ts:-0.740831 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret:-1 st: 0 flags:0 ts: 2.153359 ret: 0 st: 0 flags:1 ts: 1.047500 -ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326941 size: 1024 +ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326931 size: 1024 ret: 0 st: 1 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st: 1 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327965 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327955 size: 27834 ret:-1 st:-1 flags:0 ts: 1.730004 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 164195 size: 1024 +ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 164185 size: 1024 ret: 0 st: 0 flags:0 ts:-0.481641 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st: 0 flags:1 ts: 2.412500 -ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326941 size: 1024 +ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326931 size: 1024 ret:-1 st: 1 flags:0 ts: 1.306667 ret: 0 st: 1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st:-1 flags:0 ts:-0.904994 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret: 0 st:-1 flags:1 ts: 1.989173 -ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326941 size: 1024 +ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326931 size: 1024 ret: 0 st: 0 flags:0 ts: 0.883359 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327965 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327955 size: 27834 ret: 0 st: 0 flags:1 ts:-0.222500 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 ret:-1 st: 1 flags:0 ts: 2.671678 ret: 0 st: 1 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327965 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327955 size: 27834 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165219 size: 27925 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165209 size: 27925 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1737 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1727 size: 27837 diff --git a/tests/ref/vsynth/vsynth1-dnxhd-1080i b/tests/ref/vsynth/vsynth1-dnxhd-1080i index 211f366406..dbe2c371e0 100644 --- a/tests/ref/vsynth/vsynth1-dnxhd-1080i +++ b/tests/ref/vsynth/vsynth1-dnxhd-1080i @@ -1,4 +1,4 @@ -850261d663d64aef9a92418f15a3ee8a *tests/data/fate/vsynth1-dnxhd-1080i.mov -3031921 tests/data/fate/vsynth1-dnxhd-1080i.mov +124c991ee3ac0caef39a58a45287a762 *tests/data/fate/vsynth1-dnxhd-1080i.mov +3031911 tests/data/fate/vsynth1-dnxhd-1080i.mov a09132c6db44f415e831dcaa630a351b *tests/data/fate/vsynth1-dnxhd-1080i.out.rawvideo stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth1-mpeg4 b/tests/ref/vsynth/vsynth1-mpeg4 index 4ed1cd5d10..b6da11cef1 100644 --- a/tests/ref/vsynth/vsynth1-mpeg4 +++ b/tests/ref/vsynth/vsynth1-mpeg4 @@ -1,4 +1,4 @@ -cc2240476d97c7809d461a7d334aa067 *tests/data/fate/vsynth1-mpeg4.mp4 -540034 tests/data/fate/vsynth1-mpeg4.mp4 +a2acdf772bf7b7641079d8a03ea03ccf *tests/data/fate/vsynth1-mpeg4.mp4 +540024 tests/data/fate/vsynth1-mpeg4.mp4 f80ec173d37f2f91add031e95579a220 *tests/data/fate/vsynth1-mpeg4.out.rawvideo stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-dnxhd-1080i b/tests/ref/vsynth/vsynth2-dnxhd-1080i index 80fa5d8218..f657eb4c95 100644 --- a/tests/ref/vsynth/vsynth2-dnxhd-1080i +++ b/tests/ref/vsynth/vsynth2-dnxhd-1080i @@ -1,4 +1,4 @@ -b50f974586d2d72739eb8e2938425819 *tests/data/fate/vsynth2-dnxhd-1080i.mov -3031921 tests/data/fate/vsynth2-dnxhd-1080i.mov +5d7ab75ce6e547ed63a7a0eacf18f078 *tests/data/fate/vsynth2-dnxhd-1080i.mov +3031911 tests/data/fate/vsynth2-dnxhd-1080i.mov 744ba46da5d4c19a28562ea31061d170 *tests/data/fate/vsynth2-dnxhd-1080i.out.rawvideo stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 7603200/ 760320 diff --git a/tests/ref/vsynth/vsynth2-mpeg4 b/tests/ref/vsynth/vsynth2-mpeg4 index c6c595e2be..399ef58e3f 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4 +++ b/tests/ref/vsynth/vsynth2-mpeg4 @@ -1,4 +1,4 @@ -416519c3d814b92fe11401cfac01e3a7 *tests/data/fate/vsynth2-mpeg4.mp4 -119671 tests/data/fate/vsynth2-mpeg4.mp4 +04f74c54f4db25e1d454ede9216632c1 *tests/data/fate/vsynth2-mpeg4.mp4 +119661 tests/data/fate/vsynth2-mpeg4.mp4 9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth2-mpeg4.out.rawvideo stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200 |