summaryrefslogtreecommitdiff
path: root/src/libxvid/xine_decoder.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-04 03:47:09 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-04 03:47:09 +0000
commited3497a1e20f74c28afc2124480c60fbdbf37fab (patch)
tree6ae75337cac3aa191151001085ed21d12e11385c /src/libxvid/xine_decoder.c
parentb0f659b58e295ab3c4b1bac9ed59e9cb3f29f308 (diff)
downloadxine-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/libxvid/xine_decoder.c')
-rw-r--r--src/libxvid/xine_decoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libxvid/xine_decoder.c b/src/libxvid/xine_decoder.c
index cebd7bcff..611c07ad0 100644
--- a/src/libxvid/xine_decoder.c
+++ b/src/libxvid/xine_decoder.c
@@ -58,6 +58,7 @@ typedef struct xvid_decoder_s {
int frame_width;
int frame_height;
+ double ratio;
/* frame_duration a.k.a. video_step. It is one second metronom */
/* ticks (90,000) divided by fps (provided by demuxer from system */
@@ -94,6 +95,7 @@ static void xvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->frame_duration = buf->decoder_info[1];
this->frame_width = bih->biWidth;
this->frame_height = bih->biHeight;
+ this->ratio = (double)bih->biWidth/(double)bih->biHeight;
/* initialize decoder */
if (this->xvid_handle) {
@@ -147,7 +149,7 @@ static void xvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
image = this->video_out->get_frame (this->video_out,
this->frame_width, this->frame_height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
image->pts = buf->pts;
image->duration = this->frame_duration;