diff options
Diffstat (limited to 'src/video_dec/yuv.c')
-rw-r--r-- | src/video_dec/yuv.c | 11 |
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; |