diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-06 11:57:57 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-06 11:57:57 +0000 |
commit | 4662f1333a4bcf94bf1f18c8fa019d05b954858f (patch) | |
tree | 4ef09b592c55f24bb2e281485c5947bbf1f9525e | |
parent | 77e7f807917ee00e20b50593174660b27aad4ca8 (diff) | |
download | xine-lib-4662f1333a4bcf94bf1f18c8fa019d05b954858f.tar.gz xine-lib-4662f1333a4bcf94bf1f18c8fa019d05b954858f.tar.bz2 |
Unscaled YUY2 crashes, because step_dx/step_dy is invalid (both contain 0).
CVS patchset: 571
CVS date: 2001/09/06 11:57:57
-rw-r--r-- | src/video_out/yuv2rgb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 2b582485d..9b772c939 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -22,7 +22,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: yuv2rgb.c,v 1.13 2001/08/23 11:27:35 jkeil Exp $ + * $Id: yuv2rgb.c,v 1.14 2001/09/06 11:57:57 jkeil Exp $ */ #include "config.h" @@ -95,6 +95,10 @@ int yuv2rgb_setup (yuv2rgb_t *this, this->v_buffer = this->v_chunk = NULL; } + + this->step_dx = source_width * 32768 / dest_width; + this->step_dy = source_height * 32768 / dest_height; + if ((source_width == dest_width) && (source_height == dest_height)) { this->do_scale = 0; @@ -115,9 +119,6 @@ int yuv2rgb_setup (yuv2rgb_t *this, } else { this->do_scale = 1; - this->step_dx = source_width * 32768 / dest_width; - this->step_dy = source_height * 32768 / dest_height; - /* * space for two y-lines (for yuv2rgb_mlib) * u,v subsampled 2:1 |