Skip to content

Commit

Permalink
disp/pipewire: Fix get_property
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiatka committed Sep 26, 2023
1 parent 89b238c commit da1e731
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/video_display/pipewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,16 @@ static bool display_pw_get_property(void *state, int property, void *val, size_t

switch (property) {
case DISPLAY_PROPERTY_CODECS:
{
//TODO
*len = sizeof(codecs);
memcpy(val, codecs, *len);
if(*len < sizeof(codecs)) {
return false;
}
*len = sizeof(codecs);
memcpy(val, codecs, *len);
break;
case DISPLAY_PROPERTY_RGB_SHIFT:
if(sizeof(rgb_shift) > *len) {
return false;
}
memcpy(val, rgb_shift, sizeof(rgb_shift));
*len = sizeof(rgb_shift);
break;
Expand Down

0 comments on commit da1e731

Please sign in to comment.