[FFmpeg-devel] [PATCH 4/5] Prefer pts over dts in timestamp correction

Alexander Strange astrange
Mon Jul 26 22:16:09 CEST 2010


Fixes decoder delay incorrectly causing the output picture timestamps
to change.
---
 cmdutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index cd0b194..f86a182 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -682,7 +682,7 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t reordered_pts, int6
         ctx->num_faulty_pts += reordered_pts <= ctx->last_pts;
         ctx->last_pts = reordered_pts;
     }
-    if ((ctx->num_faulty_pts<ctx->num_faulty_dts || dts == AV_NOPTS_VALUE)
+    if ((ctx->num_faulty_pts<=ctx->num_faulty_dts || dts == AV_NOPTS_VALUE)
        && reordered_pts != AV_NOPTS_VALUE)
         pts = reordered_pts;
     else
-- 
1.7.1.1




More information about the ffmpeg-devel mailing list