Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2016 20:54:31 +0000 (UTC)
From:      Ben Woods <woodsb02@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r416754 - head/net/freerdp/files
Message-ID:  <201606112054.u5BKsVsZ017980@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: woodsb02
Date: Sat Jun 11 20:54:31 2016
New Revision: 416754
URL: https://svnweb.freebsd.org/changeset/ports/416754

Log:
  net/freerdp: Fix build with ffmpeg 3.0.x
  
  Add patch-ffmpeg29, obtained from Debian [1], to allow freerdp to
  build successfully once multimedia/ffmpeg is updated to 3.0.x.
  Note that multimedia/ffmpeg is currently still on the 2.8.x branch,
  however this patch is backwards compatible with ffmpeg 2.8.x.
  
  [1] http://sources.debian.net/patches/freerdp/1.1.0%7Egit20140921.1.440916e%2Bdfsg1-10/1011_ffmpeg-2.9.patch/
  
  Approved by:	adamw (mentor)
  Differential Revision:	https://reviews.freebsd.org/D6813

Added:
  head/net/freerdp/files/patch-ffmpeg29   (contents, props changed)

Added: head/net/freerdp/files/patch-ffmpeg29
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/freerdp/files/patch-ffmpeg29	Sat Jun 11 20:54:31 2016	(r416754)
@@ -0,0 +1,77 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
+Last-Update: <2015-11-02>
+
+--- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig	2016-06-11 21:12:27.134896000 +0200
++++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c	2016-06-11 21:14:05.282247000 +0200
+@@ -103,7 +103,7 @@
+ 	mdecoder->codec_context->bit_rate = media_type->BitRate;
+ 	mdecoder->codec_context->time_base.den = media_type->SamplesPerSecond.Numerator;
+ 	mdecoder->codec_context->time_base.num = media_type->SamplesPerSecond.Denominator;
+-	mdecoder->frame = avcodec_alloc_frame();
++	mdecoder->frame = av_frame_alloc();
+ 	return TRUE;
+ }
+ 
+@@ -322,14 +322,14 @@
+ 									 mdecoder->codec_context->width, mdecoder->codec_context->height);
+ 			mdecoder->decoded_data = malloc(mdecoder->decoded_size);
+ 			ZeroMemory(mdecoder->decoded_data, mdecoder->decoded_size);
+-			frame = avcodec_alloc_frame();
++			frame = av_frame_alloc();
+ 			avpicture_fill((AVPicture *) frame, mdecoder->decoded_data,
+ 						   mdecoder->codec_context->pix_fmt,
+ 						   mdecoder->codec_context->width, mdecoder->codec_context->height);
+ 			av_picture_copy((AVPicture *) frame, (AVPicture *) mdecoder->frame,
+ 							mdecoder->codec_context->pix_fmt,
+ 							mdecoder->codec_context->width, mdecoder->codec_context->height);
+-			av_free(frame);
++			av_frame_free(&frame);
+ 		}
+ 	return ret;
+ }
+@@ -385,7 +385,7 @@
+ 									(int16_t *) dst, &frame_size, src, src_size);
+ #else
+ 		{
+-			AVFrame *decoded_frame = avcodec_alloc_frame();
++			AVFrame *decoded_frame = av_frame_alloc();
+ 			int got_frame = 0;
+ 			AVPacket pkt;
+ 			av_init_packet(&pkt);
+@@ -398,7 +398,7 @@
+ 														decoded_frame->nb_samples, mdecoder->codec_context->sample_fmt, 1);
+ 				memcpy(dst, decoded_frame->data[0], frame_size);
+ 			}
+-			av_free(decoded_frame);
++			av_frame_free(&decoded_frame);
+ 		}
+ #endif
+ 		if(len <= 0 || frame_size <= 0)
+@@ -464,7 +464,7 @@
+ 	TSMFFFmpegDecoder *mdecoder = (TSMFFFmpegDecoder *) decoder;
+ 	switch(mdecoder->codec_context->pix_fmt)
+ 	{
+-		case PIX_FMT_YUV420P:
++		case AV_PIX_FMT_YUV420P:
+ 			return RDP_PIXFMT_I420;
+ 		default:
+ 			CLOG_ERR("unsupported pixel format %u",
+@@ -492,7 +492,7 @@
+ {
+ 	TSMFFFmpegDecoder *mdecoder = (TSMFFFmpegDecoder *) decoder;
+ 	if(mdecoder->frame)
+-		av_free(mdecoder->frame);
++		av_frame_free(&mdecoder->frame);
+ 	if(mdecoder->decoded_data)
+ 		free(mdecoder->decoded_data);
+ 	if(mdecoder->codec_context)
+@@ -501,7 +501,7 @@
+ 			avcodec_close(mdecoder->codec_context);
+ 		if(mdecoder->codec_context->extradata)
+ 			free(mdecoder->codec_context->extradata);
+-		av_free(mdecoder->codec_context);
++		av_frame_free(&mdecoder->codec_context);
+ 	}
+ 	free(decoder);
+ }



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