summaryrefslogtreecommitdiff
path: root/multimedia/2mandvd/files/patch-videowrapper.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-11-04 07:21:57 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-11-04 07:21:57 +0000
commitd5f961271e5849846ef1bbafd96cdaf4f0970d03 (patch)
tree5a0c3a6eb16214eda1d9b55a30cb2afa6441faba /multimedia/2mandvd/files/patch-videowrapper.cpp
parentcomms/dabstick-radio: unbreak build with ffmpeg 3.x (diff)
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
Notes
Notes: svn path=/head/; revision=425292
Diffstat (limited to 'multimedia/2mandvd/files/patch-videowrapper.cpp')
-rw-r--r--multimedia/2mandvd/files/patch-videowrapper.cpp37
1 files changed, 32 insertions, 5 deletions
diff --git a/multimedia/2mandvd/files/patch-videowrapper.cpp b/multimedia/2mandvd/files/patch-videowrapper.cpp
index b9e56e81834a..3c65912b5d04 100644
--- a/multimedia/2mandvd/files/patch-videowrapper.cpp
+++ b/multimedia/2mandvd/files/patch-videowrapper.cpp
@@ -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.cpp
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.cpp
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;