x264: fix colour inversion with YV12 format

It's the same as I420 but with the U/V planes swapped.
This commit is contained in:
Tim-Philipp Müller 2014-08-05 19:47:26 +01:00
parent 08c0c9512c
commit 5872a1454e

View file

@ -1971,7 +1971,7 @@ gst_x264_enc_handle_frame (GstVideoEncoder * video_enc,
gst_x264_enc_gst_to_x264_video_format (info->finfo->format, &nplanes); gst_x264_enc_gst_to_x264_video_format (info->finfo->format, &nplanes);
pic_in.img.i_plane = nplanes; pic_in.img.i_plane = nplanes;
for (i = 0; i < nplanes; i++) { for (i = 0; i < nplanes; i++) {
pic_in.img.plane[i] = GST_VIDEO_FRAME_PLANE_DATA (&fdata->vframe, i); pic_in.img.plane[i] = GST_VIDEO_FRAME_COMP_DATA (&fdata->vframe, i);
pic_in.img.i_stride[i] = GST_VIDEO_FRAME_COMP_STRIDE (&fdata->vframe, i); pic_in.img.i_stride[i] = GST_VIDEO_FRAME_COMP_STRIDE (&fdata->vframe, i);
} }