summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libxinevdec/yuv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index 6cb1b240c..2ef16ffd5 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -97,8 +97,8 @@ static void yuv_decode_data (video_decoder_t *this_gen,
(this->stream->video_out->open) (this->stream->video_out, this->stream);
bih = (xine_bmiheader *) buf->content;
- this->width = (bih->biWidth + 3) & ~0x03;
- this->height = (bih->biHeight + 3) & ~0x03;
+ this->width = bih->biWidth;
+ this->height = bih->biHeight;
if (buf->decoder_flags & BUF_FLAG_ASPECT)
this->ratio = (double)buf->decoder_info[1] / (double)buf->decoder_info[2];
@@ -123,14 +123,19 @@ static void yuv_decode_data (video_decoder_t *this_gen,
switch (buf->type) {
case BUF_VIDEO_YUY2:
+ this->width = (this->width + 1) & ~1;
_x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YUY2");
break;
case BUF_VIDEO_YV12:
+ this->width = (this->width + 1) & ~1;
+ this->height = (this->height + 1) & ~1;
_x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YV12");
break;
case BUF_VIDEO_YVU9:
+ this->width = (this->width + 3) & ~3;
+ this->height = (this->height + 3) & ~3;
_x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YVU9");
break;
@@ -139,6 +144,8 @@ static void yuv_decode_data (video_decoder_t *this_gen,
break;
case BUF_VIDEO_I420:
+ this->width = (this->width + 1) & ~1;
+ this->height = (this->height + 1) & ~1;
_x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw I420");
break;