summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-12 10:16:39 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-12 10:16:39 +0300
commit41118625efec6e4eca3221334b499a1a7f73fdc9 (patch)
tree5904fa808069df15049ad513e281c0b9a6f5e522 /src
parent5ea5bc2bc27d45da6c6d30279df7d824188a7745 (diff)
parentac79552fc41e9e277314c8c7915355089730b1cf (diff)
downloadxine-lib-41118625efec6e4eca3221334b499a1a7f73fdc9.tar.gz
xine-lib-41118625efec6e4eca3221334b499a1a7f73fdc9.tar.bz2
Merge from 1.1
--HG-- rename : src/libxinevdec/yuv.c => src/video_dec/yuv.c
Diffstat (limited to 'src')
-rw-r--r--src/video_dec/yuv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/video_dec/yuv.c b/src/video_dec/yuv.c
index c1a8b1829..b9f4b43f4 100644
--- a/src/video_dec/yuv.c
+++ b/src/video_dec/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];
@@ -121,14 +121,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;
@@ -137,6 +142,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;