FFmpeg: Fix build with newer lavc (fixes #966)
Vicki Pfau vi@endrift.com
Wed, 17 Jan 2018 23:27:41 -0800
1 files changed,
4 insertions(+),
0 deletions(-)
M
src/feature/ffmpeg/ffmpeg-encoder.c
→
src/feature/ffmpeg/ffmpeg-encoder.c
@@ -229,7 +229,11 @@ encoder->audio->sample_fmt = encoder->sampleFormat;
AVDictionary* opts = 0; av_dict_set(&opts, "strict", "-2", 0); if (encoder->context->oformat->flags & AVFMT_GLOBALHEADER) { +#ifdef AV_CODEC_FLAG_GLOBAL_HEADER + encoder->audio->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; +#else encoder->audio->flags |= CODEC_FLAG_GLOBAL_HEADER; +#endif } avcodec_open2(encoder->audio, acodec, &opts); av_dict_free(&opts);