Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvssink - Add Missing Null Checks #1214

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

stefankiesz
Copy link
Contributor

@stefankiesz stefankiesz commented Dec 17, 2024

Issue #, if available:
#1213

Description of changes:
Add missing null checks in the init_track_data function of kvssink to properly handle such cases.

Tested by hard-coding each of the values to NULL at the start of the function.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stefankiesz stefankiesz changed the base branch from master to develop December 17, 2024 02:37
@stefankiesz stefankiesz marked this pull request as ready for review December 17, 2024 21:04
@stefankiesz stefankiesz added the gstreamer Changes to kvssink or the kvssink samples label Dec 18, 2024
@@ -1505,6 +1509,11 @@ init_track_data(GstKvsSink *kvssink) {

// extract media type from GstCaps to check whether it's h264 or h265
caps = gst_pad_get_allowed_caps(collect_data->pad);

if (caps == NULL) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we print caps and also check non empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gstreamer Changes to kvssink or the kvssink samples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants