avformat/mux: Move ff_choose_timebase to nutenc, its only user

(This function does not seem to abide by its documentation.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2022-05-06 14:44:15 +02:00
parent f4a2d722aa
commit 107bdd97a9
3 changed files with 21 additions and 25 deletions

View File

@@ -89,21 +89,6 @@ static void frac_add(FFFrac *f, int64_t incr)
f->num = num;
}
AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precision)
{
AVRational q;
q = st->time_base;
for (int j = 2; j < 14; j += 1 + (j > 2))
while (q.den / q.num < min_precision && q.num % j == 0)
q.num /= j;
while (q.den / q.num < min_precision && q.den < (1<<24))
q.den <<= 1;
return q;
}
enum AVChromaLocation ff_choose_chroma_location(AVFormatContext *s, AVStream *st)
{
AVCodecParameters *par = st->codecpar;