x264: fix colour inversion with YV12 format
authorTim-Philipp Müller <tim@centricular.com>
Tue, 5 Aug 2014 18:47:26 +0000 (19:47 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 11 Aug 2014 06:35:39 +0000 (08:35 +0200)
It's the same as I420 but with the U/V planes swapped.

ext/x264/gstx264enc.c

index 3d81d962eae8d8adbe4491c9c6c5a8553a0663d9..e0d84b3695f5c24de1ceb7a9668a540ef1feb97e 100644 (file)
@@ -1958,7 +1958,7 @@ gst_x264_enc_handle_frame (GstVideoEncoder * video_enc,
       gst_x264_enc_gst_to_x264_video_format (info->finfo->format, &nplanes);
   pic_in.img.i_plane = nplanes;
   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);
   }