# HG changeset patch # User michael # Date 1235692052 0 # Node ID d80ca49779b1d90432d72a9a519a9d02e625a4ff # Parent 8c9ba1c9bcbc18f2e22675ada680ee8547a943bb Add ticks_per_frame, this should hopefully fix the regressions caused by the time_base change. diff -r 8c9ba1c9bcbc -r d80ca49779b1 utils.c --- a/utils.c Thu Feb 26 22:39:53 2009 +0000 +++ b/utils.c Thu Feb 26 23:47:32 2009 +0000 @@ -2201,9 +2201,9 @@ if (!st->r_frame_rate.num){ if( st->codec->time_base.den * (int64_t)st->time_base.num - <= st->codec->time_base.num * (int64_t)st->time_base.den){ + <= st->codec->time_base.num * st->codec->ticks_per_frame * (int64_t)st->time_base.den){ st->r_frame_rate.num = st->codec->time_base.den; - st->r_frame_rate.den = st->codec->time_base.num; + st->r_frame_rate.den = st->codec->time_base.num * st->codec->ticks_per_frame; }else{ st->r_frame_rate.num = st->time_base.den; st->r_frame_rate.den = st->time_base.num; @@ -2537,7 +2537,7 @@ if (pkt->duration == 0) { compute_frame_duration(&num, &den, st, NULL, pkt); if (den && num) { - pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num); + pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den * st->codec->ticks_per_frame, den * (int64_t)st->time_base.num); } }