aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-26 11:52:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-26 14:51:47 +0200
commiteba33396f007dc373678adea6c1a4b1a50373263 (patch)
tree382ac0d8e1569344058cf0f0c3b259405514d0b4 /libavformat/mux.c
parente5891a23372d542c81a8ee7e15844ed444ffc962 (diff)
downloadandroid_external_ffmpeg-eba33396f007dc373678adea6c1a4b1a50373263.tar.gz
android_external_ffmpeg-eba33396f007dc373678adea6c1a4b1a50373263.tar.bz2
android_external_ffmpeg-eba33396f007dc373678adea6c1a4b1a50373263.zip
avformat/mux: set avoid_negative_ts based on flags if not overridden by user or muxer
This changes the default to avoid negative timestamps. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 4781a3e8de..eba4ec3c5a 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -398,6 +398,13 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
if ((ret = init_pts(s)) < 0)
return ret;
+ if (s->avoid_negative_ts < 0) {
+ if (s->oformat->flags & (AVFMT_TS_NEGATIVE | AVFMT_NOTIMESTAMPS)) {
+ s->avoid_negative_ts = 0;
+ } else
+ s->avoid_negative_ts = 1;
+ }
+
return 0;
}