mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
obs-webrtc: Add null terminator to codec array
This fixes an issue where, when the MAX_CODECS length was equal to the amount of supported codecs (3), it would leave the list without a null terminator and crash when iterating over the elements.
This commit is contained in:
parent
fa482b6b49
commit
627308bd53
@ -1,7 +1,7 @@
|
||||
#include "whip-service.h"
|
||||
|
||||
const char *audio_codecs[MAX_CODECS] = {"opus"};
|
||||
const char *video_codecs[MAX_CODECS] = {"h264", "hevc", "av1"};
|
||||
const char *audio_codecs[] = {"opus", nullptr};
|
||||
const char *video_codecs[] = {"h264", "hevc", "av1", nullptr};
|
||||
|
||||
WHIPService::WHIPService(obs_data_t *settings, obs_service_t *)
|
||||
: server(),
|
||||
|
@ -2,8 +2,6 @@
|
||||
#include <obs-module.h>
|
||||
#include <string>
|
||||
|
||||
#define MAX_CODECS 3
|
||||
|
||||
struct WHIPService {
|
||||
std::string server;
|
||||
std::string bearer_token;
|
||||
|
Loading…
Reference in New Issue
Block a user