summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2012-06-12 10:13:33 +0300
committerTorsten Jager <t.jager@gmx.de>2012-06-12 10:13:33 +0300
commitac79552fc41e9e277314c8c7915355089730b1cf (patch)
tree79e61e9580e4942f653f9847b0e57e7c676b1930 /src
parentf78ee1cc1b8ee778052484e1cf3ebbd53ccb11b9 (diff)
downloadxine-lib-ac79552fc41e9e277314c8c7915355089730b1cf.tar.gz
xine-lib-ac79552fc41e9e277314c8c7915355089730b1cf.tar.bz2
Fixed raw yuv decoding: can't change size of _source_ image
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;