fix caps to avoid videoconvert bug in 1.8 which corrupts data
Previous way of creating caps left invalid colorimetry field 0:0:0:0, which combined with a bug present in GStreamer 1.8 led to GRAY16_LE data being corrupted when converted to GRAY16_BE (or vice versa). Current method will properly initialize colorimetry field, avoiding this problem in 1.8.
This commit is contained in:
@@ -683,10 +683,7 @@ gst_phoenixsrc_get_caps (GstBaseSrc * bsrc, GstCaps * filter)
|
||||
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
||||
}
|
||||
} else if (videoFormat != GST_VIDEO_FORMAT_UNKNOWN) {
|
||||
vinfo.finfo = gst_video_format_get_info (videoFormat);
|
||||
vinfo.width = width;
|
||||
vinfo.height = height;
|
||||
|
||||
gst_video_info_set_format (&vinfo, videoFormat, width, height);
|
||||
caps = gst_video_info_to_caps (&vinfo);
|
||||
|
||||
if (is_gray16) {
|
||||
|
||||
Reference in New Issue
Block a user