Commit 34753619 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xcb-xv: fix YV12 again

Chrominance planes swap had been broken by the vout rework.
parent 584ce938
...@@ -560,6 +560,13 @@ static picture_t *Get (vout_display_t *vd) ...@@ -560,6 +560,13 @@ static picture_t *Get (vout_display_t *vd)
/* We assume that offsets[0] is zero */ /* We assume that offsets[0] is zero */
for (int i = 1; i < pic->i_planes; i++) for (int i = 1; i < pic->i_planes; i++)
res->p[i].p_pixels = res->p[0].p_pixels + offsets[i]; res->p[i].p_pixels = res->p[0].p_pixels + offsets[i];
if (vd->fmt.i_chroma == VLC_CODEC_YV12)
{ /* YVU: swap U and V planes */
uint8_t *buf = res->p[2].p_pixels;
res->p[2].p_pixels = res->p[1].p_pixels;
res->p[1].p_pixels = buf;
}
pic_array[count] = picture_NewFromResource (&vd->fmt, res); pic_array[count] = picture_NewFromResource (&vd->fmt, res);
if (!pic_array[count]) if (!pic_array[count])
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment