all repos — mgba @ 6dd18fd86e8b37d068ef8b3ba36739fb1597f985

mGBA Game Boy Advance Emulator

FFmpeg: Fix build with newer lavc (fixes #966)
Vicki Pfau vi@endrift.com
Wed, 17 Jan 2018 23:27:41 -0800
commit

6dd18fd86e8b37d068ef8b3ba36739fb1597f985

parent

abf1af30b1e02f21c03c8f6ff01e68b23999f244

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/feature/ffmpeg/ffmpeg-encoder.csrc/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);