After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795625 - compiles only with vintage ffmpeg
compiles only with vintage ffmpeg
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2018-04-28 09:08 UTC by Sami Farin
Modified: 2018-05-17 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix builds against ffmpeg-4.0 (2.14 KB, patch)
2018-05-06 11:58 UTC, Franz Brauße
committed Details | Review
Fix builds against ffmpeg-2.3 to -2.7 (977 bytes, patch)
2018-05-06 12:05 UTC, Franz Brauße
committed Details | Review

Description Sami Farin 2018-04-28 09:08:34 UTC
gegl 0.4 and ffmpeg 4.0

make[3]: Entering directory '/usr/src/redhat/BUILD/gegl-0.4.0/operations/external'
  CC       ff_save_la-ff-save.lo
ff-save.c: In function ‘add_audio_stream’:
ff-save.c:293:17: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
     c->flags |= CODEC_FLAG_GLOBAL_HEADER;
                 ^~~~~~~~~~~~~~~~~~~~~~~~
                 AV_CODEC_FLAG_GLOBAL_HEADER
ff-save.c:293:17: note: each undeclared identifier is reported only once for each function it appears in
ff-save.c: In function ‘add_video_stream’:
ff-save.c:634:18: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
      c->flags |= CODEC_FLAG_GLOBAL_HEADER;
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  AV_CODEC_FLAG_GLOBAL_HEADER
ff-save.c: In function ‘open_video’:
ff-save.c:702:30: error: ‘AVFMT_RAWPICTURE’ undeclared (first use in this function); did you mean ‘AVFMT_NOFILE’?
   if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
                              ^~~~~~~~~~~~~~~~
                              AVFMT_NOFILE
ff-save.c: In function ‘write_video_frame’:
ff-save.c:806:28: error: ‘AVFMT_RAWPICTURE’ undeclared (first use in this function); did you mean ‘AVFMT_NOFILE’?
   if (oc->oformat->flags & AVFMT_RAWPICTURE)
                            ^~~~~~~~~~~~~~~~
                            AVFMT_NOFILE
make[3]: *** [Makefile:1177: ff_save_la-ff-save.lo] Error 1
Comment 1 Franz Brauße 2018-05-06 11:58:15 UTC
Created attachment 371744 [details] [review]
Fix builds against ffmpeg-4.0

Attached 'git format-patch' file fixes builds against ffmpeg-4.0. They've removed the since Oct 2015 deprecated AVFMT_RAWPICTURE, see https://github.com/FFmpeg/FFmpeg/commit/693a11b8a269c695c2608172c223be246dd7343e
which was "unused" and also "CODEC_FLAG_GLOBAL_HEADER" which has been a #define to the "AV_"-prefixed constant since https://github.com/FFmpeg/FFmpeg/commit/7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615
Comment 2 Franz Brauße 2018-05-06 12:05:21 UTC
Created attachment 371745 [details] [review]
Fix builds against ffmpeg-2.3 to -2.7

Partially related: I tried building against ffmpeg-2.3.6 and ffmpeg-2.7.7 which failed due to

AV_CODEC_CAP_VARIABLE_FRAME_SIZE
AV_CODEC_CAP_INTRA_ONLY

constants not being #defined by those old versions of ffmpeg. The attached patch fixes that. However, I suppose, a more reasonable approach at fixing this would be to let configure.ac require avformat/avcodec/swscale from >=v2.8 which would get rid of the preprocessor version check altogether.
Comment 3 Øyvind Kolås (pippin) 2018-05-06 12:47:12 UTC
Thank you for these fixes, we're now building with ffmpeg 4.0, even if our build
still reports plenty of deprecations.

commit a2dd56d3200aeafdecbc40c58eeef3d43a5fadcc 
Author: Franz Brausse <brausse@informatik.uni-trier.de>
Date:   Sun May 6 13:40:30 2018 +0200

    operations/external/ff-save: ffmpeg-2.3-2.7 compat; minimum lav{f,c} versions configure.ac mandates

commit 8f2545886ce3be8f1b1229bddcfa5af3216110d3
Author: Franz Brausse <brausse@informatik.uni-trier.de>
Date:   Sun May 6 13:38:09 2018 +0200

    operations/external/ff-save: ffmpeg-4.0 compat; fixes #795625
Comment 4 Sami Farin 2018-05-06 13:00:16 UTC
Almost.

ff-save.c:641:18: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
      c->flags |= CODEC_FLAG_GLOBAL_HEADER;
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  AV_CODEC_FLAG_GLOBAL_HEADER
Comment 5 Øyvind Kolås (pippin) 2018-05-06 13:11:09 UTC
commit 2896800b5e7d0c656710c70fdea57098032f3ccc
Author: Øyvind Kolås <pippin@gimp.org>
Date:   Sun May 6 15:09:03 2018 +0200

    ff-save: update another occurance of CODEC_FLAG_GLOBAL_HEADER