]>
Commit | Line | Data |
---|---|---|
061abd18 JR |
1 | --- blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp~ 2017-02-01 15:31:02.000000000 +0100 |
2 | +++ blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2018-04-29 09:24:32.089075737 +0200 | |
3 | @@ -264,9 +264,9 @@ | |
4 | m_membuffer(buffer), | |
5 | m_membufferpos(0) | |
6 | { | |
7 | - m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE)); | |
8 | + m_membuf = reinterpret_cast<data_t*>(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)); | |
9 | ||
10 | - m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this, | |
11 | + m_aviocontext = avio_alloc_context(m_membuf, AV_INPUT_BUFFER_MIN_SIZE, 0, this, | |
12 | read_packet, NULL, seek_packet); | |
13 | ||
14 | if(!m_aviocontext) | |
15 | --- blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp~ 2017-02-01 15:31:02.000000000 +0100 | |
16 | +++ blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2018-04-29 09:25:53.749932836 +0200 | |
17 | @@ -163,7 +163,7 @@ | |
18 | try | |
19 | { | |
20 | if(m_formatCtx->oformat->flags & AVFMT_GLOBALHEADER) | |
21 | - m_codecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER; | |
22 | + m_codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | |
23 | ||
24 | AVCodec* codec = avcodec_find_encoder(m_codecCtx->codec_id); | |
25 | if(!codec) | |
26 | @@ -185,11 +185,11 @@ | |
27 | if(avcodec_open2(m_codecCtx, codec, NULL)) | |
28 | AUD_THROW(AUD_ERROR_FFMPEG, codec_error); | |
29 | ||
30 | - m_output_buffer.resize(FF_MIN_BUFFER_SIZE); | |
31 | + m_output_buffer.resize(AV_INPUT_BUFFER_MIN_SIZE); | |
32 | int samplesize = AUD_MAX(AUD_SAMPLE_SIZE(m_specs), AUD_DEVICE_SAMPLE_SIZE(m_specs)); | |
33 | ||
34 | if(m_codecCtx->frame_size <= 1) { | |
35 | - m_input_size = FF_MIN_BUFFER_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels; | |
36 | + m_input_size = AV_INPUT_BUFFER_MIN_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels; | |
37 | m_input_buffer.resize(m_input_size * samplesize); | |
38 | } | |
39 | else | |
40 | --- blender-2.78b/source/blender/blenkernel/intern/writeffmpeg.c~ 2017-02-09 10:49:32.000000000 +0100 | |
41 | +++ blender-2.78b/source/blender/blenkernel/intern/writeffmpeg.c 2018-04-29 09:33:21.568228587 +0200 | |
42 | @@ -573,8 +573,6 @@ | |
43 | c->rc_buffer_aggressivity = 1.0; | |
44 | #endif | |
45 | ||
46 | - c->me_method = ME_EPZS; | |
47 | - | |
48 | codec = avcodec_find_encoder(c->codec_id); | |
49 | if (!codec) | |
50 | return NULL; | |
51 | @@ -636,14 +634,14 @@ | |
52 | ) | |
53 | { | |
54 | PRINT("Using global header\n"); | |
55 | - c->flags |= CODEC_FLAG_GLOBAL_HEADER; | |
56 | + c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | |
57 | } | |
58 | ||
59 | /* Determine whether we are encoding interlaced material or not */ | |
60 | if (rd->mode & R_FIELDS) { | |
61 | PRINT("Encoding interlaced video\n"); | |
62 | - c->flags |= CODEC_FLAG_INTERLACED_DCT; | |
63 | - c->flags |= CODEC_FLAG_INTERLACED_ME; | |
64 | + c->flags |= AV_CODEC_FLAG_INTERLACED_DCT; | |
65 | + c->flags |= AV_CODEC_FLAG_INTERLACED_ME; | |
66 | } | |
67 | ||
68 | /* xasp & yasp got float lately... */ | |
69 | @@ -732,7 +730,7 @@ | |
70 | } | |
71 | ||
72 | if (of->oformat->flags & AVFMT_GLOBALHEADER) { | |
73 | - c->flags |= CODEC_FLAG_GLOBAL_HEADER; | |
74 | + c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | |
75 | } | |
76 | ||
77 | set_ffmpeg_properties(rd, c, "audio", &opts); | |
78 | @@ -751,14 +749,14 @@ | |
79 | st->codec->time_base.den = st->codec->sample_rate; | |
80 | ||
81 | #ifndef FFMPEG_HAVE_ENCODE_AUDIO2 | |
82 | - context->audio_outbuf_size = FF_MIN_BUFFER_SIZE; | |
83 | + context->audio_outbuf_size = AV_INPUT_BUFFER_MIN_SIZE; | |
84 | #endif | |
85 | ||
86 | if (c->frame_size == 0) | |
87 | // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD)) | |
88 | // not sure if that is needed anymore, so let's try out if there are any | |
89 | // complaints regarding some ffmpeg versions users might have | |
90 | - context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels; | |
91 | + context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample / c->channels; | |
92 | else { | |
93 | context->audio_input_samples = c->frame_size; | |
94 | #ifndef FFMPEG_HAVE_ENCODE_AUDIO2 | |
95 | --- blender-2.78b/source/blender/imbuf/intern/indexer.c~ 2017-02-01 15:31:02.000000000 +0100 | |
96 | +++ blender-2.78b/source/blender/imbuf/intern/indexer.c 2018-04-29 09:36:08.866822011 +0200 | |
97 | @@ -537,7 +537,7 @@ | |
98 | av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0); | |
99 | ||
100 | if (rv->of->flags & AVFMT_GLOBALHEADER) { | |
101 | - rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER; | |
102 | + rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | |
103 | } | |
104 | ||
105 | if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) { |