Bug#888374: gmerlin-avdecoder: FTBFS with FFmpeg 4.0

peter green plugwash at p10link.net
Thu Aug 2 16:56:16 BST 2018


tags 888374 +patch
thanks

Since this package has rdeps and there seemed to be no maintainer response I decided to take a look.

The good news is I got it building, the bad news is that in order to do so I had to disable vdpau support. It seems that struct vdpau_render_state has disappeared and I have no idea what if anything it can be replaced with.

Anyway the debdiff is attatched, no intent to NMU in Debian.


-------------- next part --------------
diff -Nru gmerlin-avdecoder-1.2.0~dfsg/debian/changelog gmerlin-avdecoder-1.2.0~dfsg/debian/changelog
--- gmerlin-avdecoder-1.2.0~dfsg/debian/changelog	2017-01-31 07:37:57.000000000 +0000
+++ gmerlin-avdecoder-1.2.0~dfsg/debian/changelog	2018-08-02 14:55:06.000000000 +0000
@@ -1,3 +1,13 @@
+gmerlin-avdecoder (1.2.0~dfsg-9+rpi1) buster-staging; urgency=medium
+
+  * Fix FTBFS with ffmpeg 4.0
+    + Fixup renamed constants
+    + Disable vdpau, struct vdpau_render_state has disappeard and I hae no idea what if anything
+      it can be replaced with.
+  * Remove po/de.gmo in clean target, it seems that the build process changes it.
+
+ -- Peter Michael Green <plugwash at raspbian.org>  Thu, 02 Aug 2018 14:55:06 +0000
+
 gmerlin-avdecoder (1.2.0~dfsg-9) unstable; urgency=medium
 
   * Team upload
diff -Nru gmerlin-avdecoder-1.2.0~dfsg/debian/patches/ffmpeg_4.0.patch gmerlin-avdecoder-1.2.0~dfsg/debian/patches/ffmpeg_4.0.patch
--- gmerlin-avdecoder-1.2.0~dfsg/debian/patches/ffmpeg_4.0.patch	1970-01-01 00:00:00.000000000 +0000
+++ gmerlin-avdecoder-1.2.0~dfsg/debian/patches/ffmpeg_4.0.patch	2018-08-02 14:55:06.000000000 +0000
@@ -0,0 +1,101 @@
+Description:  Fix FTBFS with ffmpeg 4.0
+ Update constant names for ffmpeg 4.0
+Author: Peter Michael Green <plugwash at raspbian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2018-08-02
+
+Index: gmerlin-avdecoder-1.2.0~dfsg/lib/audio_ffmpeg.c
+===================================================================
+--- gmerlin-avdecoder-1.2.0~dfsg.orig/lib/audio_ffmpeg.c
++++ gmerlin-avdecoder-1.2.0~dfsg/lib/audio_ffmpeg.c
+@@ -189,7 +189,7 @@ static int fill_buffer(bgav_stream_t * s
+     bgav_dprintf("Got packet\n");
+     bgav_packet_dump(p);
+ #endif
+-    bgav_bytebuffer_append(&priv->buf, p, FF_INPUT_BUFFER_PADDING_SIZE);
++    bgav_bytebuffer_append(&priv->buf, p, AV_INPUT_BUFFER_PADDING_SIZE);
+     bgav_stream_done_packet_read(s, p);
+     }
+   return 1;
+@@ -334,7 +334,7 @@ static int decode_frame_ffmpeg(bgav_stre
+     {
+     if(!fill_buffer(s))
+       {
+-      if(!(priv->ctx->codec->capabilities & CODEC_CAP_DELAY))
++      if(!(priv->ctx->codec->capabilities & AV_CODEC_CAP_DELAY))
+         return 0;
+       }
+       
+@@ -373,7 +373,7 @@ static int decode_frame_ffmpeg(bgav_stre
+ 
+     /* Only codecs with delay are allowed to eat
+        packets without outputting audio */
+-    if(!(priv->ctx->codec->capabilities & CODEC_CAP_DELAY))
++    if(!(priv->ctx->codec->capabilities & AV_CODEC_CAP_DELAY))
+       return 0;
+     }
+   
+@@ -451,7 +451,7 @@ static int init_ffmpeg_audio(bgav_stream
+   if(s->ext_size)
+     {
+     priv->ext_data = calloc(1, s->ext_size +
+-                            FF_INPUT_BUFFER_PADDING_SIZE);
++                            AV_INPUT_BUFFER_PADDING_SIZE);
+     memcpy(priv->ext_data, s->ext_data, s->ext_size);
+     
+     priv->ctx->extradata = priv->ext_data;
+Index: gmerlin-avdecoder-1.2.0~dfsg/lib/video_ffmpeg.c
+===================================================================
+--- gmerlin-avdecoder-1.2.0~dfsg.orig/lib/video_ffmpeg.c
++++ gmerlin-avdecoder-1.2.0~dfsg/lib/video_ffmpeg.c
+@@ -121,7 +121,7 @@ typedef struct
+ 
+   /* Real video ugliness */
+ 
+-  uint32_t rv_extradata[2+FF_INPUT_BUFFER_PADDING_SIZE/4];
++  uint32_t rv_extradata[2+AV_INPUT_BUFFER_PADDING_SIZE/4];
+ 
+ #if LIBAVCODEC_VERSION_MAJOR < 54
+   AVPaletteControl palette;
+@@ -859,18 +859,18 @@ static int init_ffmpeg(bgav_stream_t * s
+    *  For streams, where the packets are not aligned with frames,
+    *  we need an AVParser
+    */
+-  priv->ctx->flags &= ~CODEC_FLAG_TRUNCATED;
++  priv->ctx->flags &= ~AV_CODEC_FLAG_TRUNCATED;
+   //  priv->ctx->flags |=  CODEC_FLAG_BITEXACT;
+ 
+   /* Check if there might be B-frames */
+-  if(codec->capabilities & CODEC_CAP_DELAY)
++  if(codec->capabilities & AV_CODEC_CAP_DELAY)
+     priv->flags |= HAS_DELAY;
+   
+   priv->ctx->opaque = s;
+   
+   if(s->ext_data)
+     {
+-    priv->extradata = calloc(s->ext_size + FF_INPUT_BUFFER_PADDING_SIZE, 1);
++    priv->extradata = calloc(s->ext_size + AV_INPUT_BUFFER_PADDING_SIZE, 1);
+     memcpy(priv->extradata, s->ext_data, s->ext_size);
+     priv->extradata_size = s->ext_size;
+ 
+@@ -1782,7 +1782,7 @@ void bgav_init_video_decoders_ffmpeg(bga
+       codecs[real_num_codecs].info = &codec_infos[i];
+       codecs[real_num_codecs].decoder.name = codecs[real_num_codecs].info->decoder_name;
+       
+-      if(c->capabilities & CODEC_CAP_DELAY) 
++      if(c->capabilities & AV_CODEC_CAP_DELAY) 
+         {
+         codecs[real_num_codecs].decoder.flags |= VCODEC_FLAG_DELAY;
+         codecs[real_num_codecs].decoder.skipto = skipto_ffmpeg;
diff -Nru gmerlin-avdecoder-1.2.0~dfsg/debian/patches/series gmerlin-avdecoder-1.2.0~dfsg/debian/patches/series
--- gmerlin-avdecoder-1.2.0~dfsg/debian/patches/series	2017-01-31 07:36:59.000000000 +0000
+++ gmerlin-avdecoder-1.2.0~dfsg/debian/patches/series	2018-08-02 14:55:06.000000000 +0000
@@ -7,3 +7,4 @@
 plugins-ldflags.patch
 libav10.patch
 ffmpeg_2.9.patch
+ffmpeg_4.0.patch
diff -Nru gmerlin-avdecoder-1.2.0~dfsg/debian/rules gmerlin-avdecoder-1.2.0~dfsg/debian/rules
--- gmerlin-avdecoder-1.2.0~dfsg/debian/rules	2017-01-31 07:36:59.000000000 +0000
+++ gmerlin-avdecoder-1.2.0~dfsg/debian/rules	2018-08-02 14:55:06.000000000 +0000
@@ -37,7 +37,7 @@
 DEB_UPSTREAM_TARBALL_MD5 = c1ea663e9da631453eec4ac79138b6c5
 
 DEB_CONFIGURE_EXTRA_FLAGS := --docdir=\$${prefix}/share/doc/libgmerlin-avdec1/ \
- --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --disable-vdpau
 DEB_DH_MAKESHLIBS_ARGS_ALL := -- -v$(DEB_UPSTREAM_VERSION)
 
 DEB_DH_STRIP_ARGS := --dbgsym-migration='gmerlin-avdecoder-dbg (<< 1.2.0~dfsg-7~)'
@@ -56,6 +56,7 @@
 clean::
 	rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
 	rm -f Makefile config.log config.status lib/Makefile
+	rm -f po/de.gmo
 
 binary-install/gmerlin-plugins-avdecoder::
 	find $(CURDIR)/debian/gmerlin-plugins-avdecoder/usr/lib/ -name '*.la' -delete


More information about the pkg-multimedia-maintainers mailing list