]> git.pld-linux.org Git - packages/blender.git/commitdiff
- fix building with ffmpeg 4.0 auto/th/blender-2.78b-3
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 07:40:43 +0000 (09:40 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 07:40:56 +0000 (09:40 +0200)
- rel 3

blender.spec
ffmpeg4.patch [new file with mode: 0644]

index f39606f7645bcc187ce249b947540d45df7951e8..9e7214100603fccfebbfd035908ec4f964dc6473 100644 (file)
@@ -5,7 +5,7 @@ Summary:        3D modeling, rendering, animation and game creation package
 Summary(pl.UTF-8):     Pakiet do tworzenia animacji 3D oraz gier
 Name:          blender
 Version:       2.78b
 Summary(pl.UTF-8):     Pakiet do tworzenia animacji 3D oraz gier
 Name:          blender
 Version:       2.78b
-Release:       2
+Release:       3
 License:       GPL
 Group:         X11/Applications/Graphics
 Source0:       http://download.blender.org/source/%{name}-%{version}.tar.gz
 License:       GPL
 Group:         X11/Applications/Graphics
 Source0:       http://download.blender.org/source/%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@ Source1:      %{name}.desktop
 Source2:       %{name}.png
 Source3:       %{name}.manpage
 Patch0:                %{name}-2.76-droid.patch
 Source2:       %{name}.png
 Source3:       %{name}.manpage
 Patch0:                %{name}-2.76-droid.patch
+Patch1:                ffmpeg4.patch
 URL:           http://www.blender.org/
 BuildRequires: OpenAL-devel
 BuildRequires: OpenEXR-devel
 URL:           http://www.blender.org/
 BuildRequires: OpenAL-devel
 BuildRequires: OpenEXR-devel
@@ -62,6 +63,7 @@ Blender to darmowy i w pełni funkcjonalny pakiet do tworzenia animacji
 %prep
 %setup -q
 %patch0 -p1
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 
 %build
 install -d build
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
new file mode 100644 (file)
index 0000000..a60e35f
--- /dev/null
@@ -0,0 +1,105 @@
+--- blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp~        2017-02-01 15:31:02.000000000 +0100
++++ blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2018-04-29 09:24:32.089075737 +0200
+@@ -264,9 +264,9 @@
+               m_membuffer(buffer),
+               m_membufferpos(0)
+ {
+-      m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE));
++      m_membuf = reinterpret_cast<data_t*>(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE));
+-      m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this,
++      m_aviocontext = avio_alloc_context(m_membuf, AV_INPUT_BUFFER_MIN_SIZE, 0, this,
+                                                                          read_packet, NULL, seek_packet);
+       if(!m_aviocontext)
+--- blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp~        2017-02-01 15:31:02.000000000 +0100
++++ blender-2.78b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp 2018-04-29 09:25:53.749932836 +0200
+@@ -163,7 +163,7 @@
+               try
+               {
+                       if(m_formatCtx->oformat->flags & AVFMT_GLOBALHEADER)
+-                              m_codecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++                              m_codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+                       AVCodec* codec = avcodec_find_encoder(m_codecCtx->codec_id);
+                       if(!codec)
+@@ -185,11 +185,11 @@
+                       if(avcodec_open2(m_codecCtx, codec, NULL))
+                               AUD_THROW(AUD_ERROR_FFMPEG, codec_error);
+-                      m_output_buffer.resize(FF_MIN_BUFFER_SIZE);
++                      m_output_buffer.resize(AV_INPUT_BUFFER_MIN_SIZE);
+                       int samplesize = AUD_MAX(AUD_SAMPLE_SIZE(m_specs), AUD_DEVICE_SAMPLE_SIZE(m_specs));
+                       if(m_codecCtx->frame_size <= 1) {
+-                              m_input_size = FF_MIN_BUFFER_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
++                              m_input_size = AV_INPUT_BUFFER_MIN_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels;
+                               m_input_buffer.resize(m_input_size * samplesize);
+                       }
+                       else
+--- blender-2.78b/source/blender/blenkernel/intern/writeffmpeg.c~      2017-02-09 10:49:32.000000000 +0100
++++ blender-2.78b/source/blender/blenkernel/intern/writeffmpeg.c       2018-04-29 09:33:21.568228587 +0200
+@@ -573,8 +573,6 @@
+       c->rc_buffer_aggressivity = 1.0;
+ #endif
+-      c->me_method = ME_EPZS;
+-      
+       codec = avcodec_find_encoder(c->codec_id);
+       if (!codec)
+               return NULL;
+@@ -636,14 +634,14 @@
+           )
+       {
+               PRINT("Using global header\n");
+-              c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++              c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+       }
+       
+       /* Determine whether we are encoding interlaced material or not */
+       if (rd->mode & R_FIELDS) {
+               PRINT("Encoding interlaced video\n");
+-              c->flags |= CODEC_FLAG_INTERLACED_DCT;
+-              c->flags |= CODEC_FLAG_INTERLACED_ME;
++              c->flags |= AV_CODEC_FLAG_INTERLACED_DCT;
++              c->flags |= AV_CODEC_FLAG_INTERLACED_ME;
+       }
+       /* xasp & yasp got float lately... */
+@@ -732,7 +730,7 @@
+       }
+       if (of->oformat->flags & AVFMT_GLOBALHEADER) {
+-              c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++              c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+       }
+       set_ffmpeg_properties(rd, c, "audio", &opts);
+@@ -751,14 +749,14 @@
+       st->codec->time_base.den = st->codec->sample_rate;
+ #ifndef FFMPEG_HAVE_ENCODE_AUDIO2
+-      context->audio_outbuf_size = FF_MIN_BUFFER_SIZE;
++      context->audio_outbuf_size = AV_INPUT_BUFFER_MIN_SIZE;
+ #endif
+       if (c->frame_size == 0)
+               // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
+               // not sure if that is needed anymore, so let's try out if there are any
+               // complaints regarding some ffmpeg versions users might have
+-              context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels;
++              context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample / c->channels;
+       else {
+               context->audio_input_samples = c->frame_size;
+ #ifndef FFMPEG_HAVE_ENCODE_AUDIO2
+--- blender-2.78b/source/blender/imbuf/intern/indexer.c~       2017-02-01 15:31:02.000000000 +0100
++++ blender-2.78b/source/blender/imbuf/intern/indexer.c        2018-04-29 09:36:08.866822011 +0200
+@@ -537,7 +537,7 @@
+       av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0);
+       if (rv->of->flags & AVFMT_GLOBALHEADER) {
+-              rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++              rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+       }
+       if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) {
This page took 0.128776 seconds and 4 git commands to generate.