Fix build errors with FFmpeg5

This commit is contained in:
max_10
2023-01-24 20:57:12 +01:00
committed by Thilo Graf
parent adc7c6deb2
commit d1289c5291
4 changed files with 10 additions and 1 deletions

View File

@@ -2294,11 +2294,13 @@ int32_t container_ffmpeg_update_tracks(Context_t *context, char *filename, int32
if (track.avCodecCtx)
{
ffmpeg_printf(10, " Handle inject_as_pcm = %d\n", track.inject_as_pcm);
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 100)
AVCodec *codec = avcodec_find_decoder(get_codecpar(stream)->codec_id);
#else
const AVCodec *codec = avcodec_find_decoder(get_codecpar(stream)->codec_id);
#endif
int errorCode = avcodec_open2(track.avCodecCtx, codec, NULL);
if (codec != NULL && !errorCode)
{

View File

@@ -28,9 +28,11 @@
#include <stdint.h>
#include <stddef.h>
#include <limits.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
#include "libavutil/common.h"
typedef struct PutBitContext
{

View File

@@ -30,6 +30,7 @@
#include <libavutil/avassert.h>
#include <ffmpeg/put_bits.h>
#include <string.h>
void avpriv_align_put_bits(PutBitContext *s)

View File

@@ -9,6 +9,10 @@
#include <libavformat/avformat.h>
#include <libswresample/swresample.h>
#include <libavutil/opt.h>
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 0, 100)
#include <libavcodec/bsf.h>
#include <libavcodec/avcodec.h>
#endif
typedef enum
{