summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-10-09 18:28:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-10-09 18:28:43 +0000
commit965530e156035305c6262dc2f3ce3842fab931a7 (patch)
treee1eb4e7a11b8aca8a0408e523764aa1222d00925 /ffmpeg.c
parentb5c44b1ab6efa06485780a5c6844548491d8ae63 (diff)
downloadffmpeg-965530e156035305c6262dc2f3ce3842fab931a7.tar.gz
Limit discontinuity handling to containers that allow discontinuities.
Originally committed as revision 15590 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 817eec30c1..38c02cd8fd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2105,7 +2105,8 @@ static int av_encode(AVFormatContext **output_files,
}
// 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){