build with ffmpeg version > 59.0.100

This commit is contained in:
Jacek Jendrzej
2021-08-28 15:16:33 +02:00
parent 10274e4606
commit 4eb8165387
6 changed files with 30 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ extern "C" {
#include <libavutil/opt.h>
#include <libavutil/samplefmt.h>
#include <libswresample/swresample.h>
#include <libavcodec/avcodec.h>
#include <ao/ao.h>
}
/* ffmpeg buf 2k */
@@ -351,9 +352,14 @@ void cAudio::run()
av_register_all();
#endif
AVCodec *codec;
AVFormatContext *avfc = NULL;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
AVInputFormat *inp;
AVCodec *codec;
#else
const AVInputFormat *inp;
const AVCodec *codec;
#endif
AVFormatContext *avfc = NULL;
AVFrame *frame;
uint8_t *inbuf = (uint8_t *)av_malloc(INBUF_SIZE);
AVPacket avpkt;