libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation
Fixes FFmpeg 4.0 deprecation warnings.
This commit is contained in:
@@ -566,7 +566,9 @@ static int ffmpeg_mux_init_internal(struct ffmpeg_mux *ffm, int argc,
|
||||
calloc(1, sizeof(struct header) * ffm->params.tracks);
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
av_register_all();
|
||||
#endif
|
||||
|
||||
if (!ffmpeg_mux_get_extra_data(ffm))
|
||||
return FFM_ERROR;
|
||||
|
@@ -190,7 +190,9 @@ static void *enc_create(obs_data_t *settings, obs_encoder_t *encoder,
|
||||
int bitrate = (int)obs_data_get_int(settings, "bitrate");
|
||||
audio_t *audio = obs_encoder_audio(encoder);
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
avcodec_register_all();
|
||||
#endif
|
||||
|
||||
enc = bzalloc(sizeof(struct enc_encoder));
|
||||
enc->encoder = encoder;
|
||||
|
@@ -265,7 +265,9 @@ static void *nvenc_create(obs_data_t *settings, obs_encoder_t *encoder)
|
||||
{
|
||||
struct nvenc_encoder *enc;
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
avcodec_register_all();
|
||||
#endif
|
||||
|
||||
enc = bzalloc(sizeof(*enc));
|
||||
enc->encoder = encoder;
|
||||
|
@@ -594,7 +594,9 @@ static bool ffmpeg_data_init(struct ffmpeg_data *data,
|
||||
if (!config->url || !*config->url)
|
||||
return false;
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
av_register_all();
|
||||
#endif
|
||||
avformat_network_init();
|
||||
|
||||
is_rtmp = (astrcmpi_n(config->url, "rtmp://", 7) == 0);
|
||||
|
@@ -272,7 +272,9 @@ static void vaapi_destroy(void *data)
|
||||
static void *vaapi_create(obs_data_t *settings, obs_encoder_t *encoder)
|
||||
{
|
||||
struct vaapi_encoder *enc;
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
avcodec_register_all();
|
||||
#endif
|
||||
|
||||
enc = bzalloc(sizeof(*enc));
|
||||
enc->encoder = encoder;
|
||||
|
@@ -147,7 +147,9 @@ extern bool load_nvenc_lib(void);
|
||||
|
||||
static bool nvenc_supported(void)
|
||||
{
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
av_register_all();
|
||||
#endif
|
||||
|
||||
profile_start(nvenc_check_name);
|
||||
|
||||
|
Reference in New Issue
Block a user