decklink: Fix bug with old channel formats
There were cases where the channel format could be set to 7, which used to be a valid format but now no longer is. If that format is set, just use SPEAKERS_7POINT1 instead.
This commit is contained in:
parent
e038bd8e55
commit
ed5ee5aae2
@ -74,8 +74,15 @@ static void decklink_update(void *data, obs_data_t *settings)
|
||||
COLOR_SPACE);
|
||||
video_range_type colorRange = (video_range_type)obs_data_get_int(settings,
|
||||
COLOR_RANGE);
|
||||
speaker_layout channelFormat = (speaker_layout)obs_data_get_int(settings,
|
||||
CHANNEL_FORMAT);
|
||||
int chFmtInt = (int)obs_data_get_int(settings, CHANNEL_FORMAT);
|
||||
|
||||
if (chFmtInt == 7) {
|
||||
chFmtInt = SPEAKERS_7POINT1;
|
||||
} else if (chFmtInt < SPEAKERS_UNKNOWN || chFmtInt > SPEAKERS_7POINT1) {
|
||||
chFmtInt = 2;
|
||||
}
|
||||
|
||||
speaker_layout channelFormat = (speaker_layout)chFmtInt;
|
||||
|
||||
decklink_enable_buffering(decklink,
|
||||
obs_data_get_bool(settings, BUFFERING));
|
||||
|
Loading…
x
Reference in New Issue
Block a user