git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75511c2
)
avformat/mux: simplify ff_choose_timebase()
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Jun 2014 18:09:55 +0000
(20:09 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Jun 2014 18:09:55 +0000
(20:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mux.c
patch
|
blob
|
history
diff --git
a/libavformat/mux.c
b/libavformat/mux.c
index
f542c9e
..
afdeca1
100644
(file)
--- a/
libavformat/mux.c
+++ b/
libavformat/mux.c
@@
-107,11
+107,8
@@
AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precisio
AVRational q;
int j;
- if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- q = (AVRational){1, st->codec->sample_rate};
- } else {
- q = st->codec->time_base;
- }
+ q = st->time_base;
+
for (j=2; j<14; j+= 1+(j>2))
while (q.den / q.num < min_precision && q.num % j == 0)
q.num /= j;