[FFmpeg-cvslog] r15590 - trunk/ffmpeg.c

michael subversion
Thu Oct 9 20:28:43 CEST 2008


Author: michael
Date: Thu Oct  9 20:28:43 2008
New Revision: 15590

Log:
Limit discontinuity handling to containers that allow discontinuities.


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Thu Oct  9 20:28:43 2008
@@ -2105,7 +2105,8 @@ static int av_encode(AVFormatContext **o
         }
 
 //        fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], ist->st->codec->codec_type);
-        if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE) {
+        if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE
+            && (is->iformat->flags & AVFMT_TS_DISCONT)) {
             int64_t pkt_dts= av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q);
             int64_t delta= pkt_dts - ist->next_pts;
             if((FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE || pkt_dts+1<ist->pts)&& !copy_ts){




More information about the ffmpeg-cvslog mailing list