diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
commit | ed3497a1e20f74c28afc2124480c60fbdbf37fab (patch) | |
tree | 6ae75337cac3aa191151001085ed21d12e11385c /src/libdivx4/xine_decoder.c | |
parent | b0f659b58e295ab3c4b1bac9ed59e9cb3f29f308 (diff) | |
download | xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.gz xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.bz2 |
support for arbitrary aspect ratios
patch by Philip Jgenstedt
CVS patchset: 5243
CVS date: 2003/08/04 03:47:09
Diffstat (limited to 'src/libdivx4/xine_decoder.c')
-rw-r--r-- | src/libdivx4/xine_decoder.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 34191dafa..c70e7753e 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/xine_decoder.c @@ -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.44 2002/12/06 01:44:06 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.45 2003/08/04 03:47:09 miguelfreitas Exp $ * * xine decoder plugin using divx4 * @@ -90,6 +90,7 @@ typedef struct divx4_decoder_s { unsigned char *buf; int size; int bufsize; + double ratio; decoreFunc decore; /* ptr to decore function in libdivxdecore */ @@ -255,6 +256,8 @@ static int divx4_init_decoder(divx4_decoder_t *this, buf_element_t *buf) { buf->type & 0xFFFF0000); } + this->ratio = (double)this->bih.biWidth/(double)this->bih.biWidth; + /* setup decoder; inspired by avifile's plugin */ param.x_dim=this->bih.biWidth; param.y_dim=this->bih.biHeight; @@ -421,7 +424,7 @@ static void divx4_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* need to decode a frame */ /* allocate image (taken from ffmpeg plugin) */ img = this->video_out->get_frame (this->video_out, this->bih.biWidth, - this->bih.biHeight, XINE_VO_ASPECT_DONT_TOUCH, + this->bih.biHeight, this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS); |