Hello community,

here is the log from the commit of package ffmpeg-2 for openSUSE:Factory 
checked in at 2019-02-13 10:04:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ffmpeg-2 (Old)
 and      /work/SRC/openSUSE:Factory/.ffmpeg-2.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ffmpeg-2"

Wed Feb 13 10:04:27 2019 rev:4 rq:673563 version:2.8.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/ffmpeg-2/ffmpeg-2.changes        2018-08-07 
09:43:28.145350849 +0200
+++ /work/SRC/openSUSE:Factory/.ffmpeg-2.new.28833/ffmpeg-2.changes     
2019-02-13 10:04:37.749572581 +0100
@@ -1,0 +2,6 @@
+Mon Feb 11 21:43:44 UTC 2019 - bjorn....@gmail.com
+
+- Add ffmpeg-fix-build-fdk-aac2.patch: Fix build with updated
+  fdk-aac. Patch backported from upstream master.
+
+-------------------------------------------------------------------

New:
----
  ffmpeg-fix-build-fdk-aac2.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ffmpeg-2.spec ++++++
--- /var/tmp/diff_new_pack.fjyzI5/_old  2019-02-13 10:04:41.829571560 +0100
+++ /var/tmp/diff_new_pack.fjyzI5/_new  2019-02-13 10:04:41.833571559 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ffmpeg-2
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -75,6 +75,7 @@
 Patch3:         ffmpeg-pkgconfig-version.patch
 Patch4:         ffmpeg-new-coder-errors.diff
 Patch5:         ffmpeg-codec-choice.diff
+Patch6:         ffmpeg-fix-build-fdk-aac2.patch
 BuildRequires:  ladspa-devel
 BuildRequires:  libgsm-devel
 BuildRequires:  libmp3lame-devel


++++++ ffmpeg-fix-build-fdk-aac2.patch ++++++
>From 141c960e21d2860e354f9b90df136184dd00a9a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <mar...@martin.st>
Date: Fri, 31 Aug 2018 14:25:30 +0300
Subject: [PATCH] libfdk-aacenc: Fix building with libfdk-aac v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When flushing the encoder, we now need to provide non-null buffer
parameters for everything, even if they are unused.

The encoderDelay parameter has been replaced by two, nDelay and
nDelayCore.

Signed-off-by: Martin Storsjö <mar...@martin.st>
---
 libavcodec/libfdk-aacenc.c | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

Index: ffmpeg-2.8.15/libavcodec/libfdk-aacenc.c
===================================================================
--- ffmpeg-2.8.15.orig/libavcodec/libfdk-aacenc.c
+++ ffmpeg-2.8.15/libavcodec/libfdk-aacenc.c
@@ -26,6 +26,11 @@
 #include "audio_frame_queue.h"
 #include "internal.h"
 
+#define FDKENC_VER_AT_LEAST(vl0, vl1) \
+    (defined(AACENCODER_LIB_VL0) && \
+        ((AACENCODER_LIB_VL0 > vl0) || \
+         (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
+
 typedef struct AACContext {
     const AVClass *class;
     HANDLE_AACENCODER handle;
@@ -286,7 +291,11 @@ static av_cold int aac_encode_init(AVCod
     }
 
     avctx->frame_size = info.frameLength;
+#if FDKENC_VER_AT_LEAST(4, 0)
+    avctx->initial_padding = info.nDelay;
+#else
     avctx->initial_padding = info.encoderDelay;
+#endif
     ff_af_queue_init(avctx, &s->afq);
 
     if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
@@ -319,28 +328,35 @@ static int aac_encode_frame(AVCodecConte
     int out_buffer_size, out_buffer_element_size;
     void *in_ptr, *out_ptr;
     int ret;
+    uint8_t dummy_buf[1];
     AACENC_ERROR err;
 
     /* handle end-of-stream small frame and flushing */
     if (!frame) {
+        /* Must be a non-null pointer, even if it's a dummy. We could use
+         * the address of anything else on the stack as well. */
+        in_ptr               = dummy_buf;
+        in_buffer_size       = 0;
+
         in_args.numInSamples = -1;
     } else {
-        in_ptr                   = frame->data[0];
-        in_buffer_size           = 2 * avctx->channels * frame->nb_samples;
-        in_buffer_element_size   = 2;
-
-        in_args.numInSamples     = avctx->channels * frame->nb_samples;
-        in_buf.numBufs           = 1;
-        in_buf.bufs              = &in_ptr;
-        in_buf.bufferIdentifiers = &in_buffer_identifier;
-        in_buf.bufSizes          = &in_buffer_size;
-        in_buf.bufElSizes        = &in_buffer_element_size;
+        in_ptr               = frame->data[0];
+        in_buffer_size       = 2 * avctx->channels * frame->nb_samples;
+
+        in_args.numInSamples = avctx->channels * frame->nb_samples;
 
         /* add current frame to the queue */
         if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
+    in_buffer_element_size   = 2;
+    in_buf.numBufs           = 1;
+    in_buf.bufs              = &in_ptr;
+    in_buf.bufferIdentifiers = &in_buffer_identifier;
+    in_buf.bufSizes          = &in_buffer_size;
+    in_buf.bufElSizes        = &in_buffer_element_size;
+
     /* The maximum packet size is 6144 bits aka 768 bytes per channel. */
     if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * 
avctx->channels), 0)) < 0)
         return ret;

Reply via email to