libobs: Fix FFmpeg constants
(This commit also modifies the deps/media-playback, obs-ffmpeg, and win-dshow modules) More fixes due to ffmpeg renaming some constants and deprecating AVFMT_RAWPICTURE and AV_PIX_FMT_VDA_VLD. Latter replaced by AV_PIX_FMT_VIDEOTOOLBOX per ffmpeg dev advice. Closes jp9000/obs-studio#1061
This commit is contained in:
@@ -26,6 +26,12 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
#define CODEC_FLAG_GLOBAL_H AV_CODEC_FLAG_GLOBAL_HEADER
|
||||
#else
|
||||
#define CODEC_FLAG_GLOBAL_H CODEC_FLAG_GLOBAL_HEADER
|
||||
#endif
|
||||
|
||||
struct media_remux_job {
|
||||
int64_t in_size;
|
||||
AVFormatContext *ifmt_ctx, *ofmt_ctx;
|
||||
@@ -95,7 +101,7 @@ static inline bool init_output(media_remux_job_t job, const char *out_filename)
|
||||
|
||||
out_stream->codec->codec_tag = 0;
|
||||
if (job->ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
|
||||
out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
out_stream->codec->flags |= CODEC_FLAG_GLOBAL_H;
|
||||
}
|
||||
|
||||
#ifndef _NDEBUG
|
||||
|
Reference in New Issue
Block a user