diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
commit | 6e8ff6e5c232de4b8235626af31ab85345120a93 (patch) | |
tree | 25930156aa9f4f2014bf6fe3d65c183262626b8d /src/libffmpeg/libavutil/rational.c | |
parent | 2f5905081ee2040537f043fe4afabbb66d26354e (diff) | |
download | xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.gz xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.bz2 |
* ffmpeg update to 51.28.0
* Workaround ffmpeg buggy codecs that don't release their DR1 frames.
* Fix several segfaults and freezing problem with H264 streams that use a lot
of reference frames (eg. 15)
* Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in
groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs
Think of "uncommon" codecs what people would never want to play with their
PDAs (they will save memory by removing them).
Note: currently both uncommon/popular codecs are _build_ but disabled.
that is, build system still need some improvements to really save memory.
warning: non-autoconf guru playing with the build system, likely breakage.
CVS patchset: 8499
CVS date: 2007/01/13 21:19:52
Diffstat (limited to 'src/libffmpeg/libavutil/rational.c')
-rw-r--r-- | src/libffmpeg/libavutil/rational.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libffmpeg/libavutil/rational.c b/src/libffmpeg/libavutil/rational.c index 0e018c41b..0480aa882 100644 --- a/src/libffmpeg/libavutil/rational.c +++ b/src/libffmpeg/libavutil/rational.c @@ -38,8 +38,10 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max) int sign= (nom<0) ^ (den<0); int64_t gcd= ff_gcd(FFABS(nom), FFABS(den)); - nom = FFABS(nom)/gcd; - den = FFABS(den)/gcd; + if(gcd){ + nom = FFABS(nom)/gcd; + den = FFABS(den)/gcd; + } if(nom<=max && den<=max){ a1= (AVRational){nom, den}; den=0; @@ -65,7 +67,7 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max) nom= den; den= next_den; } - assert(ff_gcd(a1.num, a1.den) == 1); + assert(ff_gcd(a1.num, a1.den) <= 1U); *dst_nom = sign ? -a1.num : a1.num; *dst_den = a1.den; |