mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
plugins: Fix compile errors introduced by CMake build framework 3.0
This commit is contained in:
parent
befce71219
commit
2bc4c69ee9
@ -317,14 +317,20 @@ obs_properties_t *alsa_get_properties(void *unused)
|
||||
obs_property_list_add_string(devices, descr, name);
|
||||
|
||||
next:
|
||||
if (name != NULL)
|
||||
free(name), name = NULL;
|
||||
if (name != NULL) {
|
||||
free(name);
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
if (descr != NULL)
|
||||
free(descr), descr = NULL;
|
||||
if (descr != NULL) {
|
||||
free(descr);
|
||||
descr = NULL;
|
||||
}
|
||||
|
||||
if (io != NULL)
|
||||
free(io), io = NULL;
|
||||
if (io != NULL) {
|
||||
free(io);
|
||||
io = NULL;
|
||||
}
|
||||
|
||||
++hint;
|
||||
}
|
||||
@ -412,11 +418,14 @@ void _alsa_close(struct alsa_data *data)
|
||||
|
||||
if (data->handle) {
|
||||
snd_pcm_drop(data->handle);
|
||||
snd_pcm_close(data->handle), data->handle = NULL;
|
||||
snd_pcm_close(data->handle);
|
||||
data->handle = NULL;
|
||||
}
|
||||
|
||||
if (data->buffer)
|
||||
bfree(data->buffer), data->buffer = NULL;
|
||||
if (data->buffer) {
|
||||
bfree(data->buffer);
|
||||
data->buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool _alsa_configure(struct alsa_data *data)
|
||||
|
@ -390,7 +390,6 @@ void xcomp_create_pixmap(xcb_connection_t *conn, struct xcompcap *s,
|
||||
if (depth != 32) {
|
||||
s->exclude_alpha = true;
|
||||
}
|
||||
xcb_window_t root = geom->root;
|
||||
free(geom);
|
||||
|
||||
uint32_t vert_borders = s->crop_top + s->crop_bot + 2 * s->border;
|
||||
|
@ -562,27 +562,35 @@ static bool vaapi_encode(void *data, struct encoder_frame *frame,
|
||||
size_t size;
|
||||
|
||||
enc->first_packet = false;
|
||||
|
||||
switch (enc->codec) {
|
||||
case CODEC_HEVC:
|
||||
#ifdef ENABLE_HEVC
|
||||
if (enc->codec == CODEC_HEVC) {
|
||||
obs_extract_hevc_headers(
|
||||
enc->packet->data, enc->packet->size,
|
||||
&new_packet, &size, &enc->header,
|
||||
&enc->header_size, &enc->sei,
|
||||
&enc->sei_size);
|
||||
} else
|
||||
break;
|
||||
#else
|
||||
warn("vaapi_encode: HEVC codec is not supported");
|
||||
goto fail;
|
||||
#endif
|
||||
if (enc->codec == CODEC_H264) {
|
||||
case CODEC_H264:
|
||||
obs_extract_avc_headers(
|
||||
enc->packet->data, enc->packet->size,
|
||||
&new_packet, &size, &enc->header,
|
||||
&enc->header_size, &enc->sei,
|
||||
&enc->sei_size);
|
||||
} else if (enc->codec == CODEC_AV1) {
|
||||
break;
|
||||
|
||||
case CODEC_AV1:
|
||||
obs_extract_av1_headers(enc->packet->data,
|
||||
enc->packet->size,
|
||||
&new_packet, &size,
|
||||
&enc->header,
|
||||
&enc->header_size);
|
||||
break;
|
||||
}
|
||||
|
||||
da_copy_array(enc->buffer, new_packet, size);
|
||||
|
@ -128,7 +128,6 @@ static uint32_t vaapi_display_ep_combo_rate_controls(VAProfile profile,
|
||||
VADisplay dpy,
|
||||
const char *device_path)
|
||||
{
|
||||
bool ret = false;
|
||||
VAStatus va_status;
|
||||
VAConfigAttrib attrib[1];
|
||||
attrib->type = VAConfigAttribRateControl;
|
||||
|
@ -252,7 +252,6 @@ static void vaapi_close(struct vaapi_device *device)
|
||||
static uint32_t vaapi_check_support(VADisplay display, VAProfile profile,
|
||||
VAEntrypoint entrypoint)
|
||||
{
|
||||
bool ret = false;
|
||||
VAConfigAttrib attrib[1];
|
||||
attrib->type = VAConfigAttribRateControl;
|
||||
|
||||
|
@ -1253,8 +1253,6 @@ static void parse_packet_av1(struct obs_qsv *obsqsv,
|
||||
|
||||
packet->priority = priority;
|
||||
|
||||
bool pFrame = pBS->FrameType & MFX_FRAMETYPE_P;
|
||||
|
||||
packet->dts = ts_mfx_to_obs(pBS->DecodeTimeStamp, voi);
|
||||
|
||||
#if 0
|
||||
@ -1276,8 +1274,6 @@ static void parse_packet_hevc(struct obs_qsv *obsqsv,
|
||||
const struct video_output_info *voi,
|
||||
bool *received_packet)
|
||||
{
|
||||
bool is_vcl_packet = false;
|
||||
|
||||
if (pBS == NULL || pBS->DataLength == 0) {
|
||||
*received_packet = false;
|
||||
return;
|
||||
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
#include "oss-platform.h"
|
||||
#include <sys/soundcard.h>
|
||||
|
||||
#define blog(level, msg, ...) blog(level, "oss-audio: " msg, ##__VA_ARGS__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user