Skip to content

Commit

Permalink
Remove reference to obs-ffmpeg-compat.h
Browse files Browse the repository at this point in the history
It doesn't seem to be available in libobs's public headers anymore.
  • Loading branch information
dougg3 committed Aug 16, 2024
1 parent ed99423 commit e61f064
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ffmpeg-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
******************************************************************************/

#include "ffmpeg-decode.h"
#include "obs-ffmpeg-compat.h"
#include <obs-avc.h>

int ffmpeg_decode_init(struct ffmpeg_decode *decode, enum AVCodecID id)
Expand All @@ -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;
Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
}

Expand Down

0 comments on commit e61f064

Please sign in to comment.