mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
Fix issues with invalid fourcc parameters.
Original commit message from CVS: Fix issues with invalid fourcc parameters.
This commit is contained in:
parent
0d93e57380
commit
90e3d8cd2e
2 changed files with 11 additions and 2 deletions
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue