From e61f0641f9fc881d045bd315eda76332eaa5bfc3 Mon Sep 17 00:00:00 2001 From: Doug Brown Date: Thu, 15 Aug 2024 18:54:48 -0700 Subject: [PATCH] Remove reference to obs-ffmpeg-compat.h It doesn't seem to be available in libobs's public headers anymore. --- src/ffmpeg-decode.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ffmpeg-decode.c b/src/ffmpeg-decode.c index f9c2d92..9a0970f 100644 --- a/src/ffmpeg-decode.c +++ b/src/ffmpeg-decode.c @@ -16,7 +16,6 @@ ******************************************************************************/ #include "ffmpeg-decode.h" -#include "obs-ffmpeg-compat.h" #include int ffmpeg_decode_init(struct ffmpeg_decode *decode, enum AVCodecID id) @@ -39,8 +38,8 @@ int ffmpeg_decode_init(struct ffmpeg_decode *decode, enum AVCodecID id) } #if LIBAVCODEC_VERSION_MAJOR < 60 - if (decode->codec->capabilities & CODEC_CAP_TRUNC) - decode->decoder->flags |= CODEC_FLAG_TRUNC; + if (decode->codec->capabilities & AV_CODEC_CAP_TRUNCATED) + decode->decoder->flags |= AV_CODEC_FLAG_TRUNCATED; #endif decode->decoder->flags |= AV_CODEC_FLAG_LOW_DELAY; @@ -148,7 +147,7 @@ static inline enum speaker_layout convert_speaker_layout(uint8_t channels) static inline void copy_data(struct ffmpeg_decode *decode, uint8_t *data, size_t size) { - size_t new_size = size + INPUT_BUFFER_PADDING_SIZE; + size_t new_size = size + AV_INPUT_BUFFER_PADDING_SIZE; if (decode->packet_size < new_size) { @@ -157,7 +156,7 @@ static inline void copy_data(struct ffmpeg_decode *decode, uint8_t *data, decode->packet_size = new_size; } - memset(decode->packet_buffer + size, 0, INPUT_BUFFER_PADDING_SIZE); + memset(decode->packet_buffer + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); memcpy(decode->packet_buffer, data, size); }