aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-08 08:21:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-08 15:49:02 +0100
commitc0be67cac167c9ced8dbadf80546457c6d11bad8 (patch)
tree756d6efe51e572be995c0b022c689a37473360ed /ffmpeg.c
parente806ceaa7b41ebacea94eab03ec6daaad2cd4f43 (diff)
downloadffmpeg-c0be67cac167c9ced8dbadf80546457c6d11bad8.tar.gz
ffmpeg: use (next_)dts in timestamp discontinuity detection code.
Strongly based on Anton Khirnovs code. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 74529d6892..65e476a13d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3028,13 +3028,13 @@ static int transcode(OutputFile *output_files, int nb_output_files,
pkt.dts *= ist->ts_scale;
//fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n",
- // ist->next_pts,
+ // ist->next_dts,
// pkt.dts, input_files[ist->file_index].ts_offset,
// 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_dts != 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;
+ int64_t delta = pkt_dts - ist->next_dts;
if((delta < -1LL*dts_delta_threshold*AV_TIME_BASE ||
(delta > 1LL*dts_delta_threshold*AV_TIME_BASE &&
ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||