summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-05-21 20:48:34 -0700
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-05-22 10:40:52 +0100
commite601988ddd9fe3c9a830f8b722613d60944f6f06 (patch)
treeccd288690821cd3876240f42f10efdf67f33f4e5 /ext
parentaf97600798d5d32ad05877b4e5a999a16a19b7c0 (diff)
downloadgstreamer-plugins-bad-e601988ddd9fe3c9a830f8b722613d60944f6f06.tar.gz
cogcolorspace: resample YUV->YUV conversions
Fixes a segfault (bug #618044).
Diffstat (limited to 'ext')
-rw-r--r--ext/cog/gstcogcolorspace.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/cog/gstcogcolorspace.c b/ext/cog/gstcogcolorspace.c
index 8d83fd22c..09c71de99 100644
--- a/ext/cog/gstcogcolorspace.c
+++ b/ext/cog/gstcogcolorspace.c
@@ -459,13 +459,16 @@ gst_cogcolorspace_transform (GstBaseTransform * base_transform,
}
if (gst_video_format_is_yuv (out_format) &&
- gst_video_format_is_yuv (in_format) &&
- (in_color_matrix != out_color_matrix ||
- in_chroma_site != out_chroma_site)) {
- frame = cog_virt_frame_new_subsample (frame, COG_FRAME_FORMAT_U8_444,
+ gst_video_format_is_yuv (in_format)) {
+ if ((in_color_matrix != out_color_matrix ||
+ in_chroma_site != out_chroma_site)) {
+ frame = cog_virt_frame_new_subsample (frame, COG_FRAME_FORMAT_U8_444,
+ in_chroma_site, (compress->quality >= 5) ? 8 : 6);
+ frame = cog_virt_frame_new_color_matrix_YCbCr_to_YCbCr (frame,
+ in_color_matrix, out_color_matrix, 8);
+ }
+ frame = cog_virt_frame_new_subsample (frame, new_subsample,
in_chroma_site, (compress->quality >= 5) ? 8 : 6);
- frame = cog_virt_frame_new_color_matrix_YCbCr_to_YCbCr (frame,
- in_color_matrix, out_color_matrix, 8);
}
if (gst_video_format_is_rgb (out_format) &&