Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Nov 2016 07:25:36 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r425293 - in branches/2016Q4/multimedia/2mandvd: . files
Message-ID:  <201611040725.uA47Padn001928@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Nov  4 07:25:36 2016
New Revision: 425293
URL: https://svnweb.freebsd.org/changeset/ports/425293

Log:
  MFH: r425292
  
  multimedia/2mandvd: unbreak build with ffmpeg 3.x
  
  videowrapper.cpp:107:40: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean
        'AV_PIX_FMT_RGB24'?
                      pCodecCtx->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL,
                                         ^~~~~~~~~~~~~
  videowrapper.cpp:128:19: error: use of undeclared identifier 'avcodec_alloc_frame'
          pFrameRGB=avcodec_alloc_frame();
                    ^
  
  PR:		207547
  Approved by:	ports-secteam blanket

Modified:
  branches/2016Q4/multimedia/2mandvd/Makefile
  branches/2016Q4/multimedia/2mandvd/files/patch-videowrapper.cpp
Directory Properties:
  branches/2016Q4/   (props changed)

Modified: branches/2016Q4/multimedia/2mandvd/Makefile
==============================================================================
--- branches/2016Q4/multimedia/2mandvd/Makefile	Fri Nov  4 07:21:57 2016	(r425292)
+++ branches/2016Q4/multimedia/2mandvd/Makefile	Fri Nov  4 07:25:36 2016	(r425293)
@@ -3,7 +3,7 @@
 
 PORTNAME=	2ManDVD
 PORTVERSION=	1.8.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	multimedia
 MASTER_SITES=	http://download.tuxfamily.org/2mandvd/
 

Modified: branches/2016Q4/multimedia/2mandvd/files/patch-videowrapper.cpp
==============================================================================
--- branches/2016Q4/multimedia/2mandvd/files/patch-videowrapper.cpp	Fri Nov  4 07:21:57 2016	(r425292)
+++ branches/2016Q4/multimedia/2mandvd/files/patch-videowrapper.cpp	Fri Nov  4 07:25:36 2016	(r425293)
@@ -1,7 +1,6 @@
-diff -urN videowrapper.cpp videowrapper.cpp
---- videowrapper.cpp	2012-06-06 20:25:24.000000000 +1100
-+++ videowrapper.cpp	2013-08-03 10:54:05.426228163 +1100
-@@ -38,7 +38,7 @@
+--- videowrapper.cpp.orig	2013-07-30 11:46:19 UTC
++++ videowrapper.cpp
+@@ -38,7 +38,7 @@ void videowrapper::delete_videowrapper()
  int videowrapper::load_video(QString filename)
  {
      // *** OUVERTURE DU FICHIER VIDEO ***
@@ -10,7 +9,7 @@ diff -urN videowrapper.cpp videowrapper.
          if (avformat_open_input(&pFormatCtx,filename.toAscii().data(),NULL,NULL)!=0)
          {
      #else
-@@ -91,7 +91,7 @@
+@@ -91,7 +91,7 @@ int videowrapper::load_video(QString fil
  
      // *** OUVERTURE DU CODEC ***
  
@@ -19,3 +18,31 @@ diff -urN videowrapper.cpp videowrapper.
      if(avcodec_open(pCodecCtx, pCodec)<0)
      {
      #else
+@@ -104,11 +104,11 @@ int videowrapper::load_video(QString fil
+ 
+     img_convert_ctx = sws_getContext(pCodecCtx->width,
+                     pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,
+-                    pCodecCtx->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL,
++                    pCodecCtx->height, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL,
+                     NULL, NULL);
+ 
+     // *** ON DETERMINE LA TAILLE DU BUFFER ***
+-    numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
++    numBytes=avpicture_get_size(AV_PIX_FMT_RGB24, pCodecCtx->width,
+                                 pCodecCtx->height);
+     buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
+     old_frame = -1;
+@@ -125,10 +125,10 @@ QImage videowrapper::read_frame(int64_t 
+     if ( num_frame != old_frame )
+     {
+         // *** ALLOCATE VIDEO FRAME ***
+-        pFrameRGB=avcodec_alloc_frame();
+-        pFrame=avcodec_alloc_frame();
++        pFrameRGB=av_frame_alloc();
++        pFrame=av_frame_alloc();
+ 
+-        avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
++        avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24,
+                         pCodecCtx->width, pCodecCtx->height);
+         av_seek_frame(pFormatCtx,videoStream,0, AVSEEK_FLAG_FRAME);
+         compte_frame = -1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611040725.uA47Padn001928>