summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-29 15:15:35 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-29 15:15:35 +0000
commit770914745418280b412985a51ec87974b2ea014f (patch)
tree2d01f954c0256a09b21f17f568fbd52b0001c586
parentec24fea757624f08bf4ff3674cd254407997bdcb (diff)
downloadxine-lib-770914745418280b412985a51ec87974b2ea014f.tar.gz
xine-lib-770914745418280b412985a51ec87974b2ea014f.tar.bz2
fix divzero
CVS patchset: 5816 CVS date: 2003/11/29 15:15:35
-rw-r--r--src/demuxers/demux_yuv4mpeg2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/demuxers/demux_yuv4mpeg2.c b/src/demuxers/demux_yuv4mpeg2.c
index f8952f14d..ab86e492a 100644
--- a/src/demuxers/demux_yuv4mpeg2.c
+++ b/src/demuxers/demux_yuv4mpeg2.c
@@ -24,7 +24,7 @@
* tools, visit:
* http://mjpeg.sourceforge.net/
*
- * $Id: demux_yuv4mpeg2.c,v 1.32 2003/11/16 23:33:44 f1rmb Exp $
+ * $Id: demux_yuv4mpeg2.c,v 1.33 2003/11/29 15:15:35 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -317,7 +317,10 @@ static void demux_yuv4mpeg2_send_headers(demux_plugin_t *this_gen) {
buf->decoder_info[0] = this->progressive;
buf->decoder_info[1] = this->frame_pts_inc; /* initial video step */
buf->decoder_info[2] = this->top_field_first;
- buf->decoder_info[3] = this->bih.biWidth*this->aspect_n/this->aspect_d;
+ if(this->aspect_n && this->aspect_d)
+ buf->decoder_info[3] = this->bih.biWidth*this->aspect_n/this->aspect_d;
+ else
+ buf->decoder_info[3] = this->bih.biWidth;
buf->decoder_info[4] = this->bih.biHeight;
memcpy(buf->content, &this->bih, sizeof(this->bih));
buf->size = sizeof(this->bih);