Commit | Line | Data |
---|---|---|
8b672b2c MW |
1 | https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch |
2 | ||
3 | From: Bastien Montagne <montagne29@wanadoo.fr> | |
4 | Date: Tue, 8 May 2018 16:00:52 +0200 | |
5 | Subject: fix_building_with_latest_versions_of_FFmpeg | |
6 | ||
7 | Some years-old deprecated stuff has now been removed. | |
8 | ||
9 | Correct solution is probably to use valid defines etc. in own code, but | |
10 | this is more FFMEPG maintainer task (since it also may change how old | |
11 | FFMPEG we do support...). | |
12 | --- | |
13 | intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ | |
14 | source/blender/blenkernel/intern/writeffmpeg.c | 3 +- | |
15 | 2 files changed, 41 insertions(+), 1 deletion(-) | |
16 | ||
17 | diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h | |
18 | index 9c06c8a..f7f437c 100644 | |
19 | --- a/intern/ffmpeg/ffmpeg_compat.h | |
20 | +++ b/intern/ffmpeg/ffmpeg_compat.h | |
21 | @@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) | |
22 | ||
23 | #endif | |
24 | ||
25 | +/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, | |
26 | + * so for now this will do. */ | |
27 | + | |
28 | +#ifndef FF_MIN_BUFFER_SIZE | |
29 | +# ifdef AV_INPUT_BUFFER_MIN_SIZE | |
30 | +# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE | |
31 | +# endif | |
32 | +#endif | |
33 | + | |
34 | +#ifndef FF_INPUT_BUFFER_PADDING_SIZE | |
35 | +# ifdef AV_INPUT_BUFFER_PADDING_SIZE | |
36 | +# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE | |
37 | +# endif | |
38 | +#endif | |
39 | + | |
40 | +#ifndef CODEC_FLAG_GLOBAL_HEADER | |
41 | +# ifdef AV_CODEC_FLAG_GLOBAL_HEADER | |
42 | +# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER | |
43 | +# endif | |
44 | +#endif | |
45 | + | |
46 | +#ifndef CODEC_FLAG_GLOBAL_HEADER | |
47 | +# ifdef AV_CODEC_FLAG_GLOBAL_HEADER | |
48 | +# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER | |
49 | +# endif | |
50 | +#endif | |
51 | + | |
52 | +#ifndef CODEC_FLAG_INTERLACED_DCT | |
53 | +# ifdef AV_CODEC_FLAG_INTERLACED_DCT | |
54 | +# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT | |
55 | +# endif | |
56 | +#endif | |
57 | + | |
58 | +#ifndef CODEC_FLAG_INTERLACED_ME | |
59 | +# ifdef AV_CODEC_FLAG_INTERLACED_ME | |
60 | +# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME | |
61 | +# endif | |
62 | +#endif | |
63 | + | |
64 | /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ | |
65 | #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) | |
66 | # define AV_CODEC_ID_NONE CODEC_ID_NONE | |
67 | diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c | |
68 | index a19e414..04d508a 100644 | |
69 | --- a/source/blender/blenkernel/intern/writeffmpeg.c | |
70 | +++ b/source/blender/blenkernel/intern/writeffmpeg.c | |
71 | @@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int | |
72 | c->rc_buffer_aggressivity = 1.0; | |
73 | #endif | |
74 | ||
75 | - c->me_method = ME_EPZS; | |
76 | + /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ | |
77 | + //c->me_method = ME_EPZS; | |
78 | ||
79 | codec = avcodec_find_encoder(c->codec_id); | |
80 | if (!codec) |