Control: tags 888386 + pending Dear maintainer,
I've prepared an NMU for opencv (versioned as 3.2.0+dfsg-4.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Cheers -- Sebastian Ramacher
diff -Nru opencv-3.2.0+dfsg/debian/changelog opencv-3.2.0+dfsg/debian/changelog --- opencv-3.2.0+dfsg/debian/changelog 2017-11-11 13:46:48.000000000 +0100 +++ opencv-3.2.0+dfsg/debian/changelog 2018-07-11 22:59:18.000000000 +0200 @@ -1,3 +1,10 @@ +opencv (3.2.0+dfsg-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches: Fix building with ffmpeg 4.0. (Closes: #888386) + + -- Sebastian Ramacher <sramac...@debian.org> Wed, 11 Jul 2018 22:59:18 +0200 + opencv (3.2.0+dfsg-4) unstable; urgency=medium * Team upload. diff -Nru opencv-3.2.0+dfsg/debian/patches/ffmpeg4.0.patch opencv-3.2.0+dfsg/debian/patches/ffmpeg4.0.patch --- opencv-3.2.0+dfsg/debian/patches/ffmpeg4.0.patch 1970-01-01 01:00:00.000000000 +0100 +++ opencv-3.2.0+dfsg/debian/patches/ffmpeg4.0.patch 2018-07-11 22:58:45.000000000 +0200 @@ -0,0 +1,100 @@ +Description: Fix FTBFS with FFmpeg 4.0 +Origin: upstream, https://github.com/opencv/opencv/commit/b1d208891b9f6ae3968730b120a5d0dcbba679d0 +Bug: https://github.com/opencv/opencv/pull/10011 +Bug-Debian: https://bugs.debian.org/888386 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -149,6 +149,10 @@ extern "C" { + #define AV_PIX_FMT_GRAY16BE PIX_FMT_GRAY16BE + #endif + ++#ifndef PKT_FLAG_KEY ++#define PKT_FLAG_KEY AV_PKT_FLAG_KEY ++#endif ++ + #if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 \ + ? CALC_FFMPEG_VERSION(52, 38, 100) : CALC_FFMPEG_VERSION(52, 13, 0)) + #define USE_AV_FRAME_GET_BUFFER 1 +@@ -1538,7 +1542,11 @@ static AVStream *icv_add_video_stream_FF + // some formats want stream headers to be seperate + if(oc->oformat->flags & AVFMT_GLOBALHEADER) + { ++#if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0) ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; ++#else + c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++#endif + } + #endif + +@@ -1566,23 +1574,24 @@ static int icv_av_write_frame_FFMPEG( AV + #endif + int ret = OPENCV_NO_FRAMES_WRITTEN_CODE; + +- if (oc->oformat->flags & AVFMT_RAWPICTURE) { ++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) ++ if (oc->oformat->flags & AVFMT_RAWPICTURE) ++ { + /* raw video case. The API will change slightly in the near + futur for that */ + AVPacket pkt; + av_init_packet(&pkt); + +-#ifndef PKT_FLAG_KEY +-#define PKT_FLAG_KEY AV_PKT_FLAG_KEY +-#endif +- + pkt.flags |= PKT_FLAG_KEY; + pkt.stream_index= video_st->index; + pkt.data= (uint8_t *)picture; + pkt.size= sizeof(AVPicture); + + ret = av_write_frame(oc, &pkt); +- } else { ++ } ++ else ++#endif ++ { + /* encode the image */ + AVPacket pkt; + av_init_packet(&pkt); +@@ -1740,7 +1749,9 @@ void CvVideoWriter_FFMPEG::close() + /* write the trailer, if any */ + if(ok && oc) + { +- if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 ) ++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) ++ if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) ++#endif + { + for(;;) + { +@@ -2036,7 +2047,11 @@ bool CvVideoWriter_FFMPEG::open( const c + + outbuf = NULL; + +- if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) { ++ ++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) ++ if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) ++#endif ++ { + /* allocate output buffer */ + /* assume we will never get codec output with more than 4 bytes per pixel... */ + outbuf_size = width*height*4; +@@ -2335,7 +2350,11 @@ AVStream* OutputMediaStream_FFMPEG::addV + // some formats want stream headers to be seperate + if (oc->oformat->flags & AVFMT_GLOBALHEADER) + { +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ #if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0) ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; ++ #else ++ c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ #endif + } + #endif + diff -Nru opencv-3.2.0+dfsg/debian/patches/series opencv-3.2.0+dfsg/debian/patches/series --- opencv-3.2.0+dfsg/debian/patches/series 2017-11-11 13:34:40.000000000 +0100 +++ opencv-3.2.0+dfsg/debian/patches/series 2018-07-11 22:58:48.000000000 +0200 @@ -5,3 +5,4 @@ change_jquery.js_path disable_dnn.patch fix_VFP_asm.patch +ffmpeg4.0.patch
signature.asc
Description: PGP signature