Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-12 01:38:48 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-12 03:22:48 +0400
commitc5ea3a009b15a3334ca469885303182e9f218836 (patch)
tree934d1455286baefea181ab024fd68e30bcd4c8d3 /ffmpeg.c
parent15e4bd65b1807602bdb430338b5062769a3e0045 (diff)
ffmpeg: Do not discard slightly invalid timestamps.
Fixes Ticket1627 The fate change is due to ffmpeg no longer pushing audio timestamps aggressively up (which is what caused the AV sync issues in the ticket) but leaving them as they are. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 662e84af66..411cad1c45 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2835,8 +2835,8 @@ static int process_input(void)
}
} else {
if ( delta < -1LL*dts_error_threshold*AV_TIME_BASE ||
- (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||
- pkt_dts+1<ist->pts){
+ (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
+ ) {
av_log(NULL, AV_LOG_WARNING, "DTS %"PRId64", next:%"PRId64" st:%d invalid dropping\n", pkt.dts, ist->next_dts, pkt.stream_index);
pkt.dts = AV_NOPTS_VALUE;
}
@@ -2844,8 +2844,8 @@ static int process_input(void)
int64_t pkt_pts = av_rescale_q(pkt.pts, ist->st->time_base, AV_TIME_BASE_Q);
delta = pkt_pts - ist->next_dts;
if ( delta < -1LL*dts_error_threshold*AV_TIME_BASE ||
- (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||
- pkt_pts+1<ist->pts) {
+ (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
+ ) {
av_log(NULL, AV_LOG_WARNING, "PTS %"PRId64", next:%"PRId64" invalid dropping st:%d\n", pkt.pts, ist->next_dts, pkt.stream_index);
pkt.pts = AV_NOPTS_VALUE;
}