utils: fix duration calculation for strange_duration_example.ts
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Dec 2012 03:14:44 +0000 (04:14 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Dec 2012 03:16:15 +0000 (04:16 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 92207be..75dc918 100644 (file)
@@ -2326,8 +2326,6 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
                     duration -= st->start_time;
                 else
                     duration -= st->first_dts;
                     duration -= st->start_time;
                 else
                     duration -= st->first_dts;
-                if (duration < 0)
-                    duration += 1LL<<st->pts_wrap_bits;
                 if (duration > 0) {
                     if (st->duration == AV_NOPTS_VALUE || st->duration < duration)
                         st->duration = duration;
                 if (duration > 0) {
                     if (st->duration == AV_NOPTS_VALUE || st->duration < duration)
                         st->duration = duration;