mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Fix build with newer lavc (fixes #966)
This commit is contained in:
parent
abf1af30b1
commit
6dd18fd86e
|
@ -229,7 +229,11 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue