aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-21 02:48:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-22 22:39:50 +0100
commit717ec57c7e22a5ad52fd5d447bdbad6d4c9e327f (patch)
tree7c8e64c521ec926ff024921d25c710563389c885
parenta89c01253190b9eb9de8e28a3252423bf7732511 (diff)
downloadffmpeg-717ec57c7e22a5ad52fd5d447bdbad6d4c9e327f.tar.gz
avformat/movenc: shift positive timestamps to 0 if edit lists cannot be used
Fix handling of timestamps which start far away from 0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenc.c2
-rw-r--r--tests/ref/fate/sub-movtextenc2
-rw-r--r--tests/ref/lavf/ismv12
3 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index af7efc9ba1..80ddd2c78f 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3761,7 +3761,7 @@ static int mov_write_header(AVFormatContext *s)
}
if (!supports_edts(mov) && s->avoid_negative_ts < 0) {
- s->avoid_negative_ts = 1;
+ s->avoid_negative_ts = 2;
}
/* Non-seekable output is ok if using fragmentation. If ism_lookahead
diff --git a/tests/ref/fate/sub-movtextenc b/tests/ref/fate/sub-movtextenc
index fef4a977a5..f6f41746a6 100644
--- a/tests/ref/fate/sub-movtextenc
+++ b/tests/ref/fate/sub-movtextenc
@@ -1 +1 @@
-8cb21f3632e1c86358429fb9402d19d4
+cf3d43e6de1f97681583ba08d9fe5938
diff --git a/tests/ref/lavf/ismv b/tests/ref/lavf/ismv
index dd4b162d4e..764695e54d 100644
--- a/tests/ref/lavf/ismv
+++ b/tests/ref/lavf/ismv
@@ -1,9 +1,9 @@
-ec3e7d37755378cbe9907175768afbac *./tests/data/lavf/lavf.ismv
+df243ab73b33905776bdaefb79d14be8 *./tests/data/lavf/lavf.ismv
312453 ./tests/data/lavf/lavf.ismv
-./tests/data/lavf/lavf.ismv CRC=0x9d9a638a
-a4b6fb1f46848622477230f69040942c *./tests/data/lavf/lavf.ismv
+./tests/data/lavf/lavf.ismv CRC=0xb7d29d29
+c40d80b3b35c9cd1324dead65dfcdb69 *./tests/data/lavf/lavf.ismv
321359 ./tests/data/lavf/lavf.ismv
-./tests/data/lavf/lavf.ismv CRC=0xe8130120
-ec3e7d37755378cbe9907175768afbac *./tests/data/lavf/lavf.ismv
+./tests/data/lavf/lavf.ismv CRC=0x33834815
+df243ab73b33905776bdaefb79d14be8 *./tests/data/lavf/lavf.ismv
312453 ./tests/data/lavf/lavf.ismv
-./tests/data/lavf/lavf.ismv CRC=0x9d9a638a
+./tests/data/lavf/lavf.ismv CRC=0xb7d29d29