Commit 90e3d8cd authored by David Schleef's avatar David Schleef
Browse files

Fix issues with invalid fourcc parameters.

Original commit message from CVS:
Fix issues with invalid fourcc parameters.
parent 0d93e573
......@@ -255,11 +255,18 @@ gst_videotestsrc_getcaps (GstPad * pad, GstCaps * caps)
vts = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
caps1 = NULL;
if (vts->forced_format != NULL) {
struct fourcc_list_struct *fourcc;
fourcc = paintrect_find_name (vts->forced_format);
caps1 = paint_get_caps(fourcc);
} else {
if (fourcc) {
caps1 = paint_get_caps(fourcc);
}
}
if (caps1 == NULL) {
caps1 = gst_videotestsrc_get_capslist ();
}
......
......@@ -435,6 +435,8 @@ GstCaps *paint_get_caps(struct fourcc_list_struct *format)
unsigned int fourcc;
GstCaps *caps;
g_return_val_if_fail(format, NULL);
fourcc = GST_MAKE_FOURCC (format->fourcc[0], format->fourcc[1], format->fourcc[2], format->fourcc[3]);
if(format->ext_caps){
......
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