Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 670765

Summary: media-libs/qtav-1.12.0 : /.../SubtitleProcessorFFmpeg.cpp:252:67: error: FF_INPUT_BUFFER_PADDING_SIZE was not declared in this scope
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Johannes Huber (RETIRED) <johu>
Status: RESOLVED FIXED    
Severity: normal CC: fcoiffie, jbowler, krinpaus, rose, zeekec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 653678    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
media-libs:qtav-1.12.0:20181109-154016.log
temp.tbz2
qtav-1.12.0-ffmpeg-4.patch

Description Toralf Förster gentoo-dev 2018-11-09 15:49:49 UTC
          ^~~~~~~~~~~~~
/var/tmp/portage/media-libs/qtav-1.12.0/work/QtAV-1.12.0/src/subtitle/SubtitleProcessorFFmpeg.cpp: In member function ‘virtual bool QtAV::SubtitleProcessorFFmpeg::processHeader(const QByteArray&, const QByteArray&)’:
/var/tmp/portage/media-libs/qtav-1.12.0/work/QtAV-1.12.0/src/subtitle/SubtitleProcessorFFmpeg.cpp:252:67: error: ‘FF_INPUT_BUFFER_PADDING_SIZE’ was not declared in this scope
         codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + FF_INPUT_BUFFER_PADDING_SIZE);
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-libs/qtav-1.12.0/work/QtAV-1.12.0/src/subtitle/SubtitleProcessorFFmpeg.cpp:252:67: note: suggested alternative: ‘AV_INPUT_BUFFER_PADDING_SIZE’

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-developer_test_20181106-171353

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.9.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO media-libs/qtav
[ebuild  N    ] media-libs/qtav-1.12.0  USE="opengl -gui -libav -portaudio -pulseaudio -vaapi"
Comment 1 Toralf Förster gentoo-dev 2018-11-09 15:49:52 UTC
Created attachment 554643 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-11-09 15:49:55 UTC
Created attachment 554645 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2018-11-09 15:49:57 UTC
Created attachment 554647 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2018-11-09 15:50:00 UTC
Created attachment 554649 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2018-11-09 15:50:03 UTC
Created attachment 554651 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-11-09 15:50:06 UTC
Created attachment 554653 [details]
media-libs:qtav-1.12.0:20181109-154016.log
Comment 7 Toralf Förster gentoo-dev 2018-11-09 15:50:09 UTC
Created attachment 554655 [details]
temp.tbz2
Comment 8 John Bowler 2018-11-09 19:00:36 UTC
https://github.com/FFmpeg/FFmpeg/commit/29d147c

But it seems to have happened a very long time ago, perhaps the obsolete macro has only just been removed.
Comment 9 John Bowler 2018-11-09 19:17:25 UTC
A number of deprecated things were removed and even if stuff is done to deal with these qtav builds still report use of deprecated functions.  This doesn't cause the build to fail buy I had to add -fpermissive to allow assignment of a (now?) const function pointer result to a non-const.  In then end changing CPPFLAGS as follows is sufficient:

QTAV_FIX="-DFF_INPUT_BUFFER_PADDING_SIZE=AV_INPUT_BUFFER_PADDING_SIZE -DFF_MIN_BUFFER_SIZE=AV_INPUT_BUFFER_MIN_SIZE -DCODEC_FLAG_GLOBAL_HEADER=AV_CODEC_FLAG_GLOBAL_HEADER -fpermissive"
CXXFLAGS="${CXXFLAGS} ${QTAV_FIX}"

That is from an 'env' file referened for qtav by package.env  The actual patch required will be somewhat more extensive but that at least gets it to recompile.
Comment 10 Craig Andrews gentoo-dev 2018-11-27 15:58:40 UTC
This issue has a thread on the Gentoo Forums at https://forums.gentoo.org/viewtopic-p-8285620.html
Comment 11 John Bowler 2018-11-27 16:11:51 UTC
Could someone point out on that thread that Comment 9 *is* a fix; a patch isn't really required.

(I can't post to forums because my "e-mail address is already registered to a user", (duh!)
Comment 12 Marco Genasci 2018-11-27 16:12:02 UTC
Created attachment 556458 [details, diff]
qtav-1.12.0-ffmpeg-4.patch

Upstream patch for solve problem with ffmpeg-4
Comment 13 Larry the Git Cow gentoo-dev 2018-11-29 21:20:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55e93a8acc7eb98dbbc618b2f81f112d260cdf1

commit c55e93a8acc7eb98dbbc618b2f81f112d260cdf1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-11-29 21:14:31 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-11-29 21:19:53 +0000

    media-libs/qtav: Fix build with ffmpeg-4
    
    Thanks-to: Marco Genasci <fedeliallalinea@gmail.com>
    Closes: https://bugs.gentoo.org/670765
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...-ffmpeg-4.patch => qtav-1.12.0-ffmpeg4-1.patch} |   0
 media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch  | 119 +++++++++++++++++++++
 media-libs/qtav/qtav-1.12.0.ebuild                 |   6 +-
 3 files changed, 122 insertions(+), 3 deletions(-)