summaryrefslogtreecommitdiff
path: root/src/libxinevdec/msvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec/msvc.c')
-rw-r--r--src/libxinevdec/msvc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c
index ba8e06acc..2a1d60bf7 100644
--- a/src/libxinevdec/msvc.c
+++ b/src/libxinevdec/msvc.c
@@ -22,7 +22,7 @@
* based on overview of Microsoft Video-1 algorithm
* by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt
*
- * $Id: msvc.c,v 1.22 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: msvc.c,v 1.23 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdlib.h>
@@ -67,6 +67,7 @@ typedef struct msvc_decoder_s {
unsigned int width;
unsigned int height;
+ double ratio;
} msvc_decoder_t;
/* taken from libw32dll */
@@ -231,6 +232,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->width = (bih->biWidth + 1) & ~0x1;
this->height = bih->biHeight;
+ this->ratio = (double)this->width/(double)this->height;
this->coded_width = (this->width + 3) & ~0x3;
this->coded_height = (this->height + 3) & ~0x3;
this->pitch = 2*this->coded_width;
@@ -279,7 +281,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
@@ -407,6 +409,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "msvc", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "msvc", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};