all repos — mgba @ bf7247ad4c6e30b428d444607f14242f8f4f4a2d

mGBA Game Boy Advance Emulator

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

bf7247ad4c6e30b428d444607f14242f8f4f4a2d

parent

c76b1b7a0155679667a89dd11fb43b5b96b0ee9e

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

jump to
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -291,7 +291,11 @@ encoder->video->pix_fmt = encoder->pixFormat;

encoder->video->gop_size = 60; encoder->video->max_b_frames = 3; if (encoder->context->oformat->flags & AVFMT_GLOBALHEADER) { +#ifdef AV_CODEC_FLAG_GLOBAL_HEADER + encoder->video->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; +#else encoder->video->flags |= CODEC_FLAG_GLOBAL_HEADER; +#endif } if (strcmp(vcodec->name, "libx264") == 0) { // Try to adaptively figure out when you can use a slower encoder