mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +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));
|
vts = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
|
caps1 = NULL;
|
||||||
|
|
||||||
if (vts->forced_format != NULL) {
|
if (vts->forced_format != NULL) {
|
||||||
struct fourcc_list_struct *fourcc;
|
struct fourcc_list_struct *fourcc;
|
||||||
|
|
||||||
fourcc = paintrect_find_name (vts->forced_format);
|
fourcc = paintrect_find_name (vts->forced_format);
|
||||||
|
if (fourcc) {
|
||||||
caps1 = paint_get_caps(fourcc);
|
caps1 = paint_get_caps(fourcc);
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (caps1 == NULL) {
|
||||||
caps1 = gst_videotestsrc_get_capslist ();
|
caps1 = gst_videotestsrc_get_capslist ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -435,6 +435,8 @@ GstCaps *paint_get_caps(struct fourcc_list_struct *format)
|
||||||
unsigned int fourcc;
|
unsigned int fourcc;
|
||||||
GstCaps *caps;
|
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]);
|
fourcc = GST_MAKE_FOURCC (format->fourcc[0], format->fourcc[1], format->fourcc[2], format->fourcc[3]);
|
||||||
|
|
||||||
if(format->ext_caps){
|
if(format->ext_caps){
|
||||||
|
|
Loading…
Reference in a new issue