Your message dated Tue, 08 Mar 2016 23:58:47 +0000
with message-id <[email protected]>
and subject line Bug#803847: fixed in opencv 2.4.9.1+dfsg-1.4
has caused the Debian Bug report #803847,
regarding opencv: FTBFS with FFmpeg 2.9
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.)


-- 
803847: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803847
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: opencv
Version: 2.4.9.1+dfsg-1.2
Severity: important
Tags: patch
User: [email protected]
Usertags: ffmpeg2.9

Dear Maintainer,

your package fails to build with the upcoming ffmpeg 2.9.
This bug will become release-critical at some point when the
ffmpeg2.9 transition gets closer.

Attached is a patch replacing the deprecated functionality.
It also works with ffmpeg 2.8.
Please apply this patch and forward it upstream, if necessary.

These changes have little regression potential.

Best regards,
Andreas

diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..aca2bf4
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,221 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2015-11-02>
+
+--- opencv-2.4.9.1+dfsg.orig/modules/highgui/src/cap_ffmpeg_impl.hpp
++++ opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg_impl.hpp
+@@ -136,9 +136,9 @@ extern "C" {
+ #define CV_WARN(message) fprintf(stderr, "warning: %s (%s:%d)\n", message, __FILE__, __LINE__)
+ #endif
+ 
+-/* PIX_FMT_RGBA32 macro changed in newer ffmpeg versions */
+-#ifndef PIX_FMT_RGBA32
+-#define PIX_FMT_RGBA32 PIX_FMT_RGB32
++/* AV_PIX_FMT_RGBA32 macro changed in newer ffmpeg versions */
++#ifndef AV_PIX_FMT_RGBA32
++#define AV_PIX_FMT_RGBA32 AV_PIX_FMT_RGB32
+ #endif
+ 
+ #define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c )
+@@ -304,7 +304,7 @@ void CvCapture_FFMPEG::close()
+     }
+ 
+     if( picture )
+-        av_free(picture);
++        av_frame_free(&picture);
+ 
+     if( video_st )
+     {
+@@ -572,13 +572,13 @@ bool CvCapture_FFMPEG::open( const char*
+ 
+             video_stream = i;
+             video_st = ic->streams[i];
+-            picture = avcodec_alloc_frame();
++            picture = av_frame_alloc();
+ 
+             rgb_picture.data[0] = (uint8_t*)malloc(
+-                    avpicture_get_size( PIX_FMT_BGR24,
++                    avpicture_get_size( AV_PIX_FMT_BGR24,
+                                         enc->width, enc->height ));
+             avpicture_fill( (AVPicture*)&rgb_picture, rgb_picture.data[0],
+-                            PIX_FMT_BGR24, enc->width, enc->height );
++                            AV_PIX_FMT_BGR24, enc->width, enc->height );
+ 
+             frame.width = enc->width;
+             frame.height = enc->height;
+@@ -670,7 +670,7 @@ bool CvCapture_FFMPEG::retrieveFrame(int
+     if( !video_st || !picture->data[0] )
+         return false;
+ 
+-    avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
++    avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], AV_PIX_FMT_RGB24,
+                    video_st->codec->width, video_st->codec->height);
+ 
+     if( img_convert_ctx == NULL ||
+@@ -688,7 +688,7 @@ bool CvCapture_FFMPEG::retrieveFrame(int
+                 video_st->codec->width, video_st->codec->height,
+                 video_st->codec->pix_fmt,
+                 video_st->codec->width, video_st->codec->height,
+-                PIX_FMT_BGR24,
++                AV_PIX_FMT_BGR24,
+                 SWS_BICUBIC,
+                 NULL, NULL, NULL
+                 );
+@@ -1001,10 +1001,10 @@ static AVFrame * icv_alloc_picture_FFMPE
+     uint8_t * picture_buf;
+     int size;
+ 
+-    picture = avcodec_alloc_frame();
++    picture = av_frame_alloc();
+     if (!picture)
+         return NULL;
+-    size = avpicture_get_size( (PixelFormat) pix_fmt, width, height);
++    size = avpicture_get_size( (AVPixelFormat) pix_fmt, width, height);
+     if(alloc){
+         picture_buf = (uint8_t *) malloc(size);
+         if (!picture_buf)
+@@ -1013,7 +1013,7 @@ static AVFrame * icv_alloc_picture_FFMPE
+             return NULL;
+         }
+         avpicture_fill((AVPicture *)picture, picture_buf,
+-                       (PixelFormat) pix_fmt, width, height);
++                       (AVPixelFormat) pix_fmt, width, height);
+     }
+     else {
+     }
+@@ -1096,7 +1096,7 @@ static AVStream *icv_add_video_stream_FF
+     }
+ 
+     c->gop_size = 12; /* emit one intra frame every twelve frames at most */
+-    c->pix_fmt = (PixelFormat) pixel_format;
++    c->pix_fmt = (AVPixelFormat) pixel_format;
+ 
+     if (c->codec_id == CV_CODEC(CODEC_ID_MPEG2VIDEO)) {
+         c->max_b_frames = 2;
+@@ -1220,12 +1220,12 @@ bool CvVideoWriter_FFMPEG::writeFrame( c
+     }
+ 
+     // check parameters
+-    if (input_pix_fmt == PIX_FMT_BGR24) {
++    if (input_pix_fmt == AV_PIX_FMT_BGR24) {
+         if (cn != 3) {
+             return false;
+         }
+     }
+-    else if (input_pix_fmt == PIX_FMT_GRAY8) {
++    else if (input_pix_fmt == AV_PIX_FMT_GRAY8) {
+         if (cn != 1) {
+             return false;
+         }
+@@ -1238,13 +1238,13 @@ bool CvVideoWriter_FFMPEG::writeFrame( c
+         assert( input_picture );
+         // let input_picture point to the raw data buffer of 'image'
+         avpicture_fill((AVPicture *)input_picture, (uint8_t *) data,
+-                       (PixelFormat)input_pix_fmt, width, height);
++                       (AVPixelFormat)input_pix_fmt, width, height);
+ 
+         if( !img_convert_ctx )
+         {
+             img_convert_ctx = sws_getContext(width,
+                                              height,
+-                                             (PixelFormat)input_pix_fmt,
++                                             (AVPixelFormat)input_pix_fmt,
+                                              c->width,
+                                              c->height,
+                                              c->pix_fmt,
+@@ -1262,7 +1262,7 @@ bool CvVideoWriter_FFMPEG::writeFrame( c
+     }
+     else{
+         avpicture_fill((AVPicture *)picture, (uint8_t *) data,
+-                       (PixelFormat)input_pix_fmt, width, height);
++                       (AVPixelFormat)input_pix_fmt, width, height);
+     }
+ 
+     ret = icv_av_write_frame_FFMPEG( oc, video_st, outbuf, outbuf_size, picture) >= 0;
+@@ -1373,10 +1373,10 @@ bool CvVideoWriter_FFMPEG::open( const c
+ 
+     /* determine optimal pixel format */
+     if (is_color) {
+-        input_pix_fmt = PIX_FMT_BGR24;
++        input_pix_fmt = AV_PIX_FMT_BGR24;
+     }
+     else {
+-        input_pix_fmt = PIX_FMT_GRAY8;
++        input_pix_fmt = AV_PIX_FMT_GRAY8;
+     }
+ 
+     /* Lookup codec_id for given fourcc */
+@@ -1402,21 +1402,21 @@ bool CvVideoWriter_FFMPEG::open( const c
+         codec_pix_fmt = input_pix_fmt;
+         break;
+     case CV_CODEC(CODEC_ID_HUFFYUV):
+-        codec_pix_fmt = PIX_FMT_YUV422P;
++        codec_pix_fmt = AV_PIX_FMT_YUV422P;
+         break;
+     case CV_CODEC(CODEC_ID_MJPEG):
+     case CV_CODEC(CODEC_ID_LJPEG):
+-        codec_pix_fmt = PIX_FMT_YUVJ420P;
++        codec_pix_fmt = AV_PIX_FMT_YUVJ420P;
+         bitrate_scale = 3;
+         break;
+     case CV_CODEC(CODEC_ID_RAWVIDEO):
+-        codec_pix_fmt = input_pix_fmt == PIX_FMT_GRAY8 ||
+-                        input_pix_fmt == PIX_FMT_GRAY16LE ||
+-                        input_pix_fmt == PIX_FMT_GRAY16BE ? input_pix_fmt : PIX_FMT_YUV420P;
++        codec_pix_fmt = input_pix_fmt == AV_PIX_FMT_GRAY8 ||
++                        input_pix_fmt == AV_PIX_FMT_GRAY16LE ||
++                        input_pix_fmt == AV_PIX_FMT_GRAY16BE ? input_pix_fmt : AV_PIX_FMT_YUV420P;
+         break;
+     default:
+         // good for lossy formats, MPEG, etc.
+-        codec_pix_fmt = PIX_FMT_YUV420P;
++        codec_pix_fmt = AV_PIX_FMT_YUV420P;
+         break;
+     }
+ 
+@@ -1609,7 +1609,7 @@ struct OutputMediaStream_FFMPEG
+     void write(unsigned char* data, int size, int keyFrame);
+ 
+     // add a video output stream to the container
+-    static AVStream* addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format);
++    static AVStream* addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, AVPixelFormat pixel_format);
+ 
+     AVOutputFormat* fmt_;
+     AVFormatContext* oc_;
+@@ -1648,7 +1648,7 @@ void OutputMediaStream_FFMPEG::close()
+     }
+ }
+ 
+-AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format)
++AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, AVPixelFormat pixel_format)
+ {
+         AVStream* st = avformat_new_stream(oc, 0);
+     if (!st)
+@@ -1766,7 +1766,7 @@ bool OutputMediaStream_FFMPEG::open(cons
+     oc_->max_delay = (int)(0.7 * AV_TIME_BASE); // This reduces buffer underrun warnings with MPEG
+ 
+     // set a few optimal pixel formats for lossless codecs of interest..
+-    PixelFormat codec_pix_fmt = PIX_FMT_YUV420P;
++    AVPixelFormat codec_pix_fmt = AV_PIX_FMT_YUV420P;
+     int bitrate_scale = 64;
+ 
+     // TODO -- safe to ignore output audio stream?
+@@ -1943,15 +1943,15 @@ bool InputMediaStream_FFMPEG::open(const
+ 
+             switch (enc->pix_fmt)
+             {
+-            case PIX_FMT_YUV420P:
++            case AV_PIX_FMT_YUV420P:
+                 *chroma_format = ::VideoChromaFormat_YUV420;
+                 break;
+ 
+-            case PIX_FMT_YUV422P:
++            case AV_PIX_FMT_YUV422P:
+                 *chroma_format = ::VideoChromaFormat_YUV422;
+                 break;
+ 
+-            case PIX_FMT_YUV444P:
++            case AV_PIX_FMT_YUV444P:
+                 *chroma_format = ::VideoChromaFormat_YUV444;
+                 break;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4341750..16da81a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ fix_path_of_opencl_headers
 libav10.patch
 optimize_i586.patch
 Don-t-check-sphinx-build-version.patch
+ffmpeg_2.9.patch

--- End Message ---
--- Begin Message ---
Source: opencv
Source-Version: 2.4.9.1+dfsg-1.4

We believe that the bug you reported is fixed in the latest version of
opencv, 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.
Sebastian Ramacher <[email protected]> (supplier of updated opencv 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: Sun, 06 Mar 2016 23:57:30 +0100
Source: opencv
Binary: opencv-doc libcv-dev libcv2.4 libhighgui-dev libhighgui2.4 libcvaux-dev 
libcvaux2.4 libopencv-dev opencv-data libopencv-core-dev libopencv-core2.4v5 
libopencv-ml-dev libopencv-ml2.4v5 libopencv-imgproc-dev libopencv-imgproc2.4v5 
libopencv-video-dev libopencv-video2.4v5 libopencv-objdetect-dev 
libopencv-objdetect2.4v5 libopencv-highgui-dev libopencv-highgui2.4v5 
libopencv-calib3d-dev libopencv-calib3d2.4v5 libopencv-flann-dev 
libopencv-flann2.4v5 libopencv-features2d-dev libopencv-features2d2.4v5 
libopencv-legacy-dev libopencv-legacy2.4v5 libopencv-contrib-dev 
libopencv-contrib2.4v5 libopencv-ts-dev libopencv-ts2.4v5 libopencv-photo-dev 
libopencv-photo2.4v5 libopencv-videostab-dev libopencv-videostab2.4v5 
libopencv-stitching-dev libopencv-stitching2.4v5 libopencv-gpu-dev 
libopencv-gpu2.4v5 libopencv-superres-dev libopencv-superres2.4v5 
libopencv-ocl-dev libopencv-ocl2.4v5 libopencv2.4-java libopencv2.4-jni 
python-opencv
Architecture: source all
Version: 2.4.9.1+dfsg-1.4
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team 
<[email protected]>
Changed-By: Sebastian Ramacher <[email protected]>
Description:
 libcv-dev  - Translation package for libcv-dev
 libcv2.4   - computer vision library - libcv* translation package
 libcvaux-dev - Translation package for libcvaux-dev
 libcvaux2.4 - computer vision library - libcvaux translation package
 libhighgui-dev - Translation package for libhighgui-dev
 libhighgui2.4 - computer vision library - libhighgui translation package
 libopencv-calib3d-dev - development files for libopencv-calib3d
 libopencv-calib3d2.4v5 - computer vision Camera Calibration library
 libopencv-contrib-dev - development files for libopencv-contrib
 libopencv-contrib2.4v5 - computer vision contrib library
 libopencv-core-dev - development files for libopencv-core
 libopencv-core2.4v5 - computer vision core library
 libopencv-dev - development files for opencv
 libopencv-features2d-dev - development files for libopencv-features2d
 libopencv-features2d2.4v5 - computer vision Feature Detection and Descriptor 
Extraction libra
 libopencv-flann-dev - development files for libopencv-flann
 libopencv-flann2.4v5 - computer vision Clustering and Search in 
Multi-Dimensional spaces
 libopencv-gpu-dev - development files for libopencv-gpu2.4v5
 libopencv-gpu2.4v5 - computer vision GPU library
 libopencv-highgui-dev - development files for libopencv-highgui
 libopencv-highgui2.4v5 - computer vision High-level GUI and Media I/O library
 libopencv-imgproc-dev - development files for libopencv-imgproc
 libopencv-imgproc2.4v5 - computer vision Image Processing library
 libopencv-legacy-dev - development files for libopencv-legacy
 libopencv-legacy2.4v5 - computer vision legacy library
 libopencv-ml-dev - development files for libopencv-ml
 libopencv-ml2.4v5 - computer vision Machine Learning library
 libopencv-objdetect-dev - development files for libopencv-objdetect
 libopencv-objdetect2.4v5 - computer vision Object Detection library
 libopencv-ocl-dev - development files for libopencv-ocl2.4v5
 libopencv-ocl2.4v5 - computer vision OpenCL support library
 libopencv-photo-dev - development files for libopencv-photo2.4v5
 libopencv-photo2.4v5 - computer vision computational photography library
 libopencv-stitching-dev - development files for libopencv-stitching2.4v5
 libopencv-stitching2.4v5 - computer vision image stitching library
 libopencv-superres-dev - development files for libopencv-superres2.4v5
 libopencv-superres2.4v5 - computer vision Super Resolution library
 libopencv-ts-dev - development files for libopencv-ts2.4v5
 libopencv-ts2.4v5 - computer vision ts library
 libopencv-video-dev - development files for libopencv-video
 libopencv-video2.4v5 - computer vision Video analysis library
 libopencv-videostab-dev - development files for libopencv-videostab2.4v5
 libopencv-videostab2.4v5 - computer vision video stabilization library
 libopencv2.4-java - Java bindings for the computer vision library
 libopencv2.4-jni - Java jni library for the computer vision library
 opencv-data - development data for opencv
 opencv-doc - OpenCV documentation and examples
 python-opencv - Python bindings for the computer vision library
Closes: 803847
Changes:
 opencv (2.4.9.1+dfsg-1.4) unstable; urgency=medium
 .
   * Non-maintainer upload.
 .
   [ Andreas Cadhalpun ]
   * Fix build with ffmpeg 3.0. (Closes: #803847)
Checksums-Sha1:
 3459cc263fb5f5ad197857b6b11689f7aba6b5f1 5984 opencv_2.4.9.1+dfsg-1.4.dsc
 6a9b47a27a4077d361bdda4689828a6ea74dfccb 32480 
opencv_2.4.9.1+dfsg-1.4.debian.tar.xz
 df4b8258025bd1bd39dfcfa4953c8e95bbcc1af8 12292 
libcv2.4_2.4.9.1+dfsg-1.4_all.deb
 72d9ca5d43cc76933039eb0187f8627d1b39e617 12296 
libcvaux2.4_2.4.9.1+dfsg-1.4_all.deb
 3ba8ff674dd44a2fc3ecdeda8f4208a4d865b63c 12240 
libhighgui2.4_2.4.9.1+dfsg-1.4_all.deb
 9dacbd9c1b2e349204ba68f929c4b72451c4a09d 442176 
libopencv2.4-java_2.4.9.1+dfsg-1.4_all.deb
 5cac440c307273cb485678fa80ebddda2aa79788 1609262 
opencv-data_2.4.9.1+dfsg-1.4_all.deb
 0a57b8e616e69ceb2e490fe71c671b30c390baa8 1406824 
opencv-doc_2.4.9.1+dfsg-1.4_all.deb
Checksums-Sha256:
 0d1dd3cf0b0697daa6096c7fba38c638dbcf777de07c7684e225b0c3d1b8ec17 5984 
opencv_2.4.9.1+dfsg-1.4.dsc
 e32f37e49d46dc625272e1892e0ee41ad79a1cd28560667c5bb70209c7cb30b6 32480 
opencv_2.4.9.1+dfsg-1.4.debian.tar.xz
 4894c905d94d9fe8f76f0e406fc93253db69df102a105819049c5e3de47da2fa 12292 
libcv2.4_2.4.9.1+dfsg-1.4_all.deb
 54596957a5919eb39ef1ba5d1a6537f47961e001c16a787fe9af0c72529e5da6 12296 
libcvaux2.4_2.4.9.1+dfsg-1.4_all.deb
 887a6c07317204cf543492506be12aaec4b2d75fcd73b64c7ceefdd2377830f5 12240 
libhighgui2.4_2.4.9.1+dfsg-1.4_all.deb
 bd767a2159ddc6a267a77c529fa64c4cd4b6b2d9c876c86c713bb4691c0fa2fb 442176 
libopencv2.4-java_2.4.9.1+dfsg-1.4_all.deb
 306c12340a5bc782af00369635ebb50612e65449ac4d9a6a58ab2410c74e38d3 1609262 
opencv-data_2.4.9.1+dfsg-1.4_all.deb
 fd5626b302c4995f526ff97d251e63c1da6353064ee195a4e162d70ebe99cffc 1406824 
opencv-doc_2.4.9.1+dfsg-1.4_all.deb
Files:
 d1c111fe76ba634c575739aa582e09e2 5984 devel optional 
opencv_2.4.9.1+dfsg-1.4.dsc
 c8bced1d5bcee014ae690a3bacde161a 32480 devel optional 
opencv_2.4.9.1+dfsg-1.4.debian.tar.xz
 1245972dafe5a1f98ce4018627f99aa9 12292 devel optional 
libcv2.4_2.4.9.1+dfsg-1.4_all.deb
 960a4fed81ca4f0f731079f968624da5 12296 devel optional 
libcvaux2.4_2.4.9.1+dfsg-1.4_all.deb
 10a46a0fabba920bc70be276dc10f4a1 12240 devel optional 
libhighgui2.4_2.4.9.1+dfsg-1.4_all.deb
 95a399029fd638302614df6df5f9aa1a 442176 java optional 
libopencv2.4-java_2.4.9.1+dfsg-1.4_all.deb
 806871644f78fdf3c051ca8bbc9c941e 1609262 libdevel optional 
opencv-data_2.4.9.1+dfsg-1.4_all.deb
 dedf33c6a137482e0efeaff085c43178 1406824 doc optional 
opencv-doc_2.4.9.1+dfsg-1.4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJW3LzcAAoJEGny/FFupxmT43gP/2p9HE+yRAR3lf7j/pIQlM2j
1M+ILSDCZXFayF98K91biRvkcF3J1vJFlExDY6TLeF1dVH51q6HPvn0yTFb6Hjms
LwloTYI11dZWUToQ7qodJXzi6s+ixkSoyHb9HlkcGOHpslbPo43c0+LQHeoSAoo6
g/ejia6Ue20w/QZEf0t5XBmCQ+fP3S5W74FsHUwe1vbZBzufJltKnDXe5dFsuhps
0Q73yTXxUHHxjcJm3IrkHCwK2Sfawfb7DVzY6Axgz51mzsjsALeu66xghBaCoKc5
sCRfs/SduKJsZTkvKfbxiAO9YUK47/jSP+2O2JmLvjyDJdbGBF9kCOhbgLFHRSVj
ZFWVKkoVCTy2jrUUjRxLblh0sIwmC7V+eFmZ3KiR9p4BoaOHSQ64lKo90nu9arqx
/HkLsebdWhI/FiVnHCc3VyvvNMdR/1aO8fq8vrCF7SPIwMyu5n7gndn1LlE8vVy+
/yh+4Cqh6sAL4IqyqQ8oNCeeTeglMf3HiSH9uPUgz0bPjgrnx6p8U2u2qau9qJr8
Mzjo8PLeYWaIO+fB70R1JvS99cl4iINz14ER7ZQsssEs0vcWR7s2iHm5TaPjKdPK
cs8xqvjyXlFX7pJN75t7uoVuybPmN2WGX77xfJ0xTCqNePFMRKfJz3aJ/ew5kHW6
rbK64nWQu+x9RgwPneMM
=pu4D
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to