Your message dated Mon, 23 Jul 2018 06:34:18 +0000
with message-id <[email protected]>
and subject line Bug#904267: fixed in zoneminder 1.30.4+dfsg1-5
has caused the Debian Bug report #904267,
regarding zoneminder: FTBFS with FFmpeg 4.0
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
904267: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904267
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: zoneminder
Version: 1.30.4+dfsg1-4
Severity: serious
Tags: sid buster ftbfs
User: [email protected]
Usertags: ffmpeg-4.0-transition
Control: block 896893 by -1

Hi,

zoneminder FTBFS with FFmpeg 4.0 which was recently uploaded to
unstable. Unfortunately the last rebuild I did was before #887968 was
fixed so I never caught this package before the transition started.

Build log:
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:243:19: error: 
> 'CODEC_FLAG_QSCALE' was not declared in this scope
>        c->flags |= CODEC_FLAG_QSCALE;
>                    ^~~~~~~~~~~~~~~~~
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:243:19: note: suggested 
> alternative: 'AV_CODEC_FLAG_QSCALE'
>        c->flags |= CODEC_FLAG_QSCALE;
>                    ^~~~~~~~~~~~~~~~~
>                    AV_CODEC_FLAG_QSCALE
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:268:19: error: 
> 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope
>        c->flags |= CODEC_FLAG_GLOBAL_HEADER;
>                    ^~~~~~~~~~~~~~~~~~~~~~~~
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:268:19: note: suggested 
> alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER'
>        c->flags |= CODEC_FLAG_GLOBAL_HEADER;
>                    ^~~~~~~~~~~~~~~~~~~~~~~~
>                    AV_CODEC_FLAG_GLOBAL_HEADER
[...]
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:428:22: error: 
> 'AVFMT_RAWPICTURE' was not declared in this scope
>    if ( !(of->flags & AVFMT_RAWPICTURE) )
>                       ^~~~~~~~~~~~~~~~
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:428:22: note: suggested 
> alternative: 'AVFMT_NOFILE'
>    if ( !(of->flags & AVFMT_RAWPICTURE) )
>                       ^~~~~~~~~~~~~~~~
>                       AVFMT_NOFILE
[...]
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:675:20: error: 
> 'AVFMT_RAWPICTURE' was not declared in this scope
>    if ( of->flags & AVFMT_RAWPICTURE )
>                     ^~~~~~~~~~~~~~~~
> Manifying 21 pod documents
> /<<BUILDDIR>>/zoneminder-1.30.4+dfsg1/src/zm_mpeg.cpp:675:20: note: suggested 
> alternative: 'AVFMT_NOFILE'
>    if ( of->flags & AVFMT_RAWPICTURE )
>                     ^~~~~~~~~~~~~~~~
>                     AVFMT_NOFILE

UNTESTED patch I found on FreeBSD ports attached. From here:
https://svnweb.freebsd.org/ports/head/multimedia/zoneminder/files/patch-ffmpeg4?view=markup

James
Partially based on https://github.com/ZoneMinder/zoneminder/commit/e17bcb9178d0

--- src/zm_mpeg.cpp.orig	2017-05-09 14:54:48 UTC
+++ src/zm_mpeg.cpp
@@ -240,7 +240,11 @@ void VideoStream::SetupCodec( int colours, int subpixe
     {
       // Quality based bitrate control (VBR). Scale is 1..31 where 1 is best.
       // This gets rid of artifacts in the beginning of the movie; and well, even quality.
+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0)
+      c->flags |= AV_CODEC_FLAG_QSCALE;
+#else
       c->flags |= CODEC_FLAG_QSCALE;
+#endif
       c->global_quality = FF_QP2LAMBDA * (31 - (31 * (bitrate / 100.0)));
     }
     else
@@ -265,7 +269,11 @@ void VideoStream::SetupCodec( int colours, int subpixe
 
     // some formats want stream headers to be separate
     if ( of->flags & AVFMT_GLOBALHEADER )
+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0)
+      c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+#else
       c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+#endif
   }
   else
   {
@@ -425,7 +433,9 @@ void VideoStream::OpenStream( )
   }
 
   video_outbuf = NULL;
+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0)
   if ( !(of->flags & AVFMT_RAWPICTURE) )
+#endif
   {
     /* allocate output buffer */
     /* XXX: API change will be done */
@@ -672,6 +682,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t
   AVPacket *pkt = packet_buffers[packet_index];
   av_init_packet( pkt );
   int got_packet = 0;
+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0)
   if ( of->flags & AVFMT_RAWPICTURE )
   {
 #if LIBAVCODEC_VERSION_CHECK(52, 30, 2, 30, 2)
@@ -685,6 +696,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t
     got_packet = 1;
   }
   else
+#endif
   {
     opicture_ptr->pts = c->frame_number;
     opicture_ptr->quality = c->global_quality;
--- src/zm_sdp.cpp.orig	2017-05-09 14:54:48 UTC
+++ src/zm_sdp.cpp
@@ -483,7 +483,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont
           uint8_t *dest = 
           (uint8_t *)av_malloc(packet_size + sizeof(start_sequence) +
                        stream->codec->extradata_size +
+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
+                       AV_INPUT_BUFFER_PADDING_SIZE);
+#else
                        FF_INPUT_BUFFER_PADDING_SIZE);
+#endif
           if(dest) {
               if(stream->codec->extradata_size) {
                 // av_realloc?
@@ -494,7 +498,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont
               memcpy(dest+stream->codec->extradata_size, start_sequence, sizeof(start_sequence));
               memcpy(dest+stream->codec->extradata_size+sizeof(start_sequence), decoded_packet, packet_size);
               memset(dest+stream->codec->extradata_size+sizeof(start_sequence)+
+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
+                     packet_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+#else
                      packet_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+#endif
 
               stream->codec->extradata= dest;
               stream->codec->extradata_size+= sizeof(start_sequence)+packet_size;

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Source: zoneminder
Source-Version: 1.30.4+dfsg1-5

We believe that the bug you reported is fixed in the latest version of
zoneminder, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Smirnov <[email protected]> (supplier of updated zoneminder package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 23 Jul 2018 16:02:06 +1000
Source: zoneminder
Binary: zoneminder zoneminder-doc
Architecture: source amd64 all
Version: 1.30.4+dfsg1-5
Distribution: unstable
Urgency: medium
Maintainer: Dmitry Smirnov <[email protected]>
Changed-By: Dmitry Smirnov <[email protected]>
Description:
 zoneminder - video camera security and surveillance solution
 zoneminder-doc - video camera security and surveillance solution 
(documentation)
Closes: 904267
Changes:
 zoneminder (1.30.4+dfsg1-5) unstable; urgency=medium
 .
   * Suggests += net-tools
     "net-tools" provides "arp" utility used for probing of network cameras.
   * New upstream patch to fix applying detected camera info.
   * New patch to fix detection of network cameras.
   * New patch to fix FTBFS with FFmpeg 4.0 (Closes: #904267)
     Thanks, James Cowgill.
   * copyright info for "web/includes/csrf/*".
   * libjson-any-perl --> libjson-maybexs-perl.
Checksums-Sha1:
 6abd390c4fb45db59797093be5b0cca8ff1d59b6 2797 zoneminder_1.30.4+dfsg1-5.dsc
 80ec6712bd358be23ce780debaf74c9c6fccf7c0 32344 
zoneminder_1.30.4+dfsg1-5.debian.tar.xz
 ff3ba17f3085701a10c974758b3422ca38e9af35 36347676 
zoneminder-dbgsym_1.30.4+dfsg1-5_amd64.deb
 e29cfe055f3e5bfd4b6ec3e916e012871e8242fb 5315420 
zoneminder-doc_1.30.4+dfsg1-5_all.deb
 d4edf2bdf16efa841cc4a6cb9dc5ad30101051f6 16590 
zoneminder_1.30.4+dfsg1-5_amd64.buildinfo
 1b1231ac17ad693508a12e9dd62b80e6cef50316 4560144 
zoneminder_1.30.4+dfsg1-5_amd64.deb
Checksums-Sha256:
 685d657c1a7f85c129942e0dba1e96e060c6cb79837a1cf907ea9aae69eba01c 2797 
zoneminder_1.30.4+dfsg1-5.dsc
 65c8a38a3face1bd730cccebef5fc54a9c771ead2d6dc04dc086da096e910814 32344 
zoneminder_1.30.4+dfsg1-5.debian.tar.xz
 9d6d05e61244bc08d1823057a0339f76a36329f77f3681c6c3986ff43a862034 36347676 
zoneminder-dbgsym_1.30.4+dfsg1-5_amd64.deb
 9c4c908ea91ffd68f2ae97f4bbe29a3d4bd5f2f6489958c544883e754a57b820 5315420 
zoneminder-doc_1.30.4+dfsg1-5_all.deb
 0bdc00f3cf1e0b8f4676931f77a5263021b37c6b15bd5a68e5cf2a72ad492ef2 16590 
zoneminder_1.30.4+dfsg1-5_amd64.buildinfo
 6837bf8305f8420a7b103e2f2d309fd3d2646b9375ea06bdbdce6d995a5670ee 4560144 
zoneminder_1.30.4+dfsg1-5_amd64.deb
Files:
 2be5d72cc8a25f78fb6607836d985923 2797 net optional 
zoneminder_1.30.4+dfsg1-5.dsc
 2f6e05fc490792aefc8b7f1a0742cf11 32344 net optional 
zoneminder_1.30.4+dfsg1-5.debian.tar.xz
 76af30665506f3b46529c6c0a5c0653b 36347676 debug optional 
zoneminder-dbgsym_1.30.4+dfsg1-5_amd64.deb
 afbaaae49cae27cc8085355935d35d7f 5315420 doc optional 
zoneminder-doc_1.30.4+dfsg1-5_all.deb
 64dfb29ab977e1f0e4b089353779fbb8 16590 net optional 
zoneminder_1.30.4+dfsg1-5_amd64.buildinfo
 0a44eeb71d8557f24e8bf10ded2c9b78 4560144 net optional 
zoneminder_1.30.4+dfsg1-5_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEULx8+TnSDCcqawZWUra72VOWjRsFAltVcb4ACgkQUra72VOW
jRuAihAAiB4qW30quifezNfTKjdnnfsI8G3LH0Ul/YtmWqk/FSPA6xl4UiOik8YX
lLUajsbUE5eqCK7RRmNqmRIj4HROUpGX8zEt6WM1jX1EWsuLoAPzAlGsdcADBAeB
RXdxUVdy/ZsDvnhrkq/LXgLiwm/l3wvScp5WhFqWpyYlkPIUbBMaxZ8Lj4QWRF+E
gDKuDrV17qS8h2hqtrkc04AdRXKWTC9aV2xAMfvU2RCKHO68U99twDrCBEnMt/e/
mm9J2Gnwg3+RUWWCpjdOrZRLaXGKWSleqNGmAMnCaMf9f+dTGZaRQMYc5fOvIxur
+GAz+paMGoVj9lHMogA7VZeDucHDG0DAIGkm7F8+3AaEBJlllD0/NFMvkVAMCNEZ
nrAFjf0Q9j16SR2xg/Nw9VMWIPr9o2eg35Y3q8O0UtzHLIg4AtU3VEJ037SRrdZE
wJkNNR8Fc49ZOMVIYq/cwy9xdEJaYVb3IUZOKObV9eCfE0UUEVT6xAalrhlXSM4z
wnECvPSDaIhuAwDuooN6spgJdwXc8R+rgW/rrTfGePlCS2jTI3wC9bEOLAYcrEGW
uYKXleeU9ICNt/+qbdIIs936T7TRxMpT2SG42OwFwWDVO4F5BZjLtUjBoqk/tWj/
FwG4a3Oj/DGboMcBzTjjS//thX4Tcvw5wacfAcHeN8jpCB6OzTI=
=LdKN
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to