mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
videotestsrc: bail out on unsupported caps
This avoids using uninitialized data (and properly rejects caps). Coverity 1139898
This commit is contained in:
parent
577ec29245
commit
ba8220a9fd
1 changed files with 7 additions and 0 deletions
|
@ -708,6 +708,8 @@ gst_video_test_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||
videotestsrc->bayer = TRUE;
|
||||
videotestsrc->x_invert = x_inv;
|
||||
videotestsrc->y_invert = y_inv;
|
||||
} else {
|
||||
goto unsupported_caps;
|
||||
}
|
||||
|
||||
/* create chroma subsampler */
|
||||
|
@ -764,6 +766,11 @@ parse_failed:
|
|||
GST_DEBUG_OBJECT (bsrc, "failed to parse caps");
|
||||
return FALSE;
|
||||
}
|
||||
unsupported_caps:
|
||||
{
|
||||
GST_DEBUG_OBJECT (bsrc, "unsupported caps: %" GST_PTR_FORMAT, caps);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue