diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2003-02-23 22:03:16 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2003-02-23 22:03:16 +0000 |
commit | ac748fb53881771f61fabc781ad2b6ebc03d11f1 (patch) | |
tree | 872e681fff28a96ff0846d7fc35239d00c8419fe | |
parent | 2336e860acb5891aeb4f68fecc6009587bc1e12b (diff) | |
download | xine-lib-ac748fb53881771f61fabc781ad2b6ebc03d11f1.tar.gz xine-lib-ac748fb53881771f61fabc781ad2b6ebc03d11f1.tar.bz2 |
handle aspect ratio == 0
CVS patchset: 4271
CVS date: 2003/02/23 22:03:16
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index 14d9579da..83286f0ef 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2002 the xine project + * Copyright (C) 2001-2003 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.97 2003/02/23 01:22:56 jstembridge Exp $ + * $Id: xine_decoder.c,v 1.98 2003/02/23 22:03:16 guenter Exp $ * * xine decoder plugin using ffmpeg * @@ -504,8 +504,14 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { float diff; this->xine_aspect_ratio = XINE_VO_ASPECT_DONT_TOUCH; + diff = abs_float( this->context->aspect_ratio - (float)this->bih.biWidth/(float)this->bih.biHeight); + /* according to miguel some decoders set aspect_ratio=0, + * stick to XINE_VO_ASPECT_DONT_TOUCH in that case + */ + if ( abs_float (this->context->aspect_ratio) < 0.1 ) + diff = 0.0; if( diff > abs_float( this->context->aspect_ratio - 1.0 ) ) { this->xine_aspect_ratio = XINE_VO_ASPECT_SQUARE; |