nutenc: avoid negative timestamps
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 26 Sep 2012 13:56:06 +0000 (15:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 26 Sep 2012 13:56:06 +0000 (15:56 +0200)
Fixes Ticket1468

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutenc.c

index a4b7765..d227c9a 100644 (file)
@@ -697,6 +697,9 @@ static int nut_write_header(AVFormatContext *s){
     if ((ret = write_headers(s, bc)) < 0)
         return ret;
 
+    if (s->avoid_negative_ts < 0)
+        s->avoid_negative_ts = 1;
+
     avio_flush(bc);
 
     return 0;