diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2011-01-30 20:18:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-07 19:32:07 +0100 |
commit | 76ad67cae751658ce2d84e83b38a4d673e9e85a3 (patch) | |
tree | fd7a80906aa640e700f427539a9c87dd2d27b5c0 /cmdutils.c | |
parent | 52b2e95cd9f829b83b879a0694173d4ef1558c46 (diff) | |
download | ffmpeg-76ad67cae751658ce2d84e83b38a4d673e9e85a3.tar.gz |
Implement guessed_pts in avcodec_decode_video2
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cmdutils.c b/cmdutils.c index c68f37fe20..0679f011b2 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -749,33 +749,6 @@ int read_file(const char *filename, char **bufptr, size_t *size) return 0; } -void init_pts_correction(PtsCorrectionContext *ctx) -{ - ctx->num_faulty_pts = ctx->num_faulty_dts = 0; - ctx->last_pts = ctx->last_dts = INT64_MIN; -} - -int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t reordered_pts, int64_t dts) -{ - int64_t pts = AV_NOPTS_VALUE; - - if (dts != AV_NOPTS_VALUE) { - ctx->num_faulty_dts += dts <= ctx->last_dts; - ctx->last_dts = dts; - } - if (reordered_pts != AV_NOPTS_VALUE) { - 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) - && reordered_pts != AV_NOPTS_VALUE) - pts = reordered_pts; - else - pts = dts; - - return pts; -} - FILE *get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name) { |