You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/mux: simplify ff_choose_timebase()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -107,11 +107,8 @@ AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precisio
|
|||||||
AVRational q;
|
AVRational q;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
q = st->time_base;
|
||||||
q = (AVRational){1, st->codec->sample_rate};
|
|
||||||
} else {
|
|
||||||
q = st->codec->time_base;
|
|
||||||
}
|
|
||||||
for (j=2; j<14; j+= 1+(j>2))
|
for (j=2; j<14; j+= 1+(j>2))
|
||||||
while (q.den / q.num < min_precision && q.num % j == 0)
|
while (q.den / q.num < min_precision && q.num % j == 0)
|
||||||
q.num /= j;
|
q.num /= j;
|
||||||
|
Reference in New Issue
Block a user