[packages/gpac] - fix building with ffmpeg 3 - rel 16

baggins baggins at pld-linux.org
Wed Mar 23 08:42:18 CET 2016


commit 705c169208564c95fb7e6e832a1f735aa092db5d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Mar 23 08:41:57 2016 +0100

    - fix building with ffmpeg 3
    - rel 16

 ffmpeg3.patch | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gpac.spec     |  4 ++-
 2 files changed, 96 insertions(+), 1 deletion(-)
---
diff --git a/gpac.spec b/gpac.spec
index 5ac4b0b..a32271a 100644
--- a/gpac.spec
+++ b/gpac.spec
@@ -27,7 +27,7 @@ Summary:	GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-
 Summary(pl.UTF-8):	GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
 Name:		gpac
 Version:	0.5.0
-Release:	15.%{snap}.1
+Release:	16.%{snap}.1
 License:	LGPL v2+
 Group:		Applications/Multimedia
 # Source0:	http://downloads.sourceforge.net/gpac/%{name}-%{version}.tar.gz
@@ -41,6 +41,7 @@ Patch4:		%{name}-flags.patch
 Patch5:		wxWidgets3.patch
 Patch6:		%{name}-js.patch
 Patch7:		%{name}-apps.patch
+Patch8:		ffmpeg3.patch
 URL:		http://gpac.sourceforge.net/
 %{?with_directfb:BuildRequires:	DirectFB-devel}
 BuildRequires:	OpenGL-GLU-devel
@@ -168,6 +169,7 @@ Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 sed -i -e 's/wx-config/wx-gtk2-unicode-config/' configure
 chmod a+x configure
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..9131610
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,93 @@
+--- gpac/applications/dashcast/video_encoder.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/video_encoder.c	2016-03-23 08:34:30.284438268 +0100
+@@ -87,7 +87,7 @@
+ 		video_output_file->codec_ctx->time_base.den = video_data_conf->time_base.den;
+ 		video_output_file->codec_ctx->time_base.num = video_data_conf->time_base.num * video_data_conf->time_base.den / video_data_conf->framerate;
+ 	}
+-	video_output_file->codec_ctx->pix_fmt = PIX_FMT_YUV420P;
++	video_output_file->codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	video_output_file->codec_ctx->gop_size = video_data_conf->framerate;
+ 
+ //	video_output_file->codec_ctx->codec_id = video_codec->id;
+--- gpac/applications/dashcast/video_muxer.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/video_muxer.c	2016-03-23 08:35:04.941564779 +0100
+@@ -642,7 +642,7 @@
+ 
+ 	video_stream->codec->time_base = video_codec_ctx->time_base;
+ 
+-	video_stream->codec->pix_fmt = PIX_FMT_YUV420P;
++	video_stream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	video_stream->codec->gop_size = video_codec_ctx->time_base.den; //video_output_file->video_data_conf->framerate;
+ 
+ 	av_opt_set(video_stream->codec->priv_data, "preset", "ultrafast", 0);
+--- gpac/applications/dashcast/video_scaler.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/video_scaler.c	2016-03-23 08:35:29.971877188 +0100
+@@ -125,7 +125,7 @@
+ 	dc_consumer_init(&video_scaled_data->consumer, video_cb_size, name);
+ 
+ 	video_scaled_data->num_producers = max_source;
+-	video_scaled_data->out_pix_fmt = PIX_FMT_YUV420P;
++	video_scaled_data->out_pix_fmt = AV_PIX_FMT_YUV420P;
+ 	GF_SAFE_ALLOC_N(video_scaled_data->vsprop, max_source, VideoScaledProp);
+ 	memset(video_scaled_data->vsprop, 0, max_source * sizeof(VideoScaledProp));
+ 
+@@ -189,7 +189,7 @@
+ 		video_scaled_data_node->cropped_frame->width  = video_input_data->vprop[index].width  - video_input_data->vprop[index].crop_x;
+ 		video_scaled_data_node->cropped_frame->height = video_input_data->vprop[index].height - video_input_data->vprop[index].crop_y;
+ #endif
+-		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
++		if (av_picture_crop((AVPicture*)video_scaled_data_node->cropped_frame, (AVPicture*)video_data_node->vframe, AV_PIX_FMT_YUV420P, video_input_data->vprop[index].crop_y, video_input_data->vprop[index].crop_x) < 0) {
+ 			GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("Video scaler: error while cropping picture.\n"));
+ 			return -1;
+ 		}
+--- gpac/applications/dashcast/audio_decoder.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/audio_decoder.c	2016-03-23 08:37:24.863173759 +0100
+@@ -204,7 +204,7 @@
+ 			packet.data = NULL;
+ 			packet.size = 0;
+ 
+-#ifndef FF_API_AVFRAME_LAVC
++#if 0
+ 			avcodec_get_frame_defaults(audio_input_data->aframe);
+ #else
+ 			av_frame_unref(audio_input_data->aframe);
+@@ -239,7 +239,7 @@
+ 		if (packet.stream_index == audio_input_file->astream_idx) {
+ 			/* Set audio frame to default */
+ 
+-#ifndef FF_API_AVFRAME_LAVC
++#if 0
+ 			avcodec_get_frame_defaults(audio_input_data->aframe);
+ #else
+ 			av_frame_unref(audio_input_data->aframe);
+--- gpac/applications/dashcast/audio_encoder.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/audio_encoder.c	2016-03-23 08:37:37.899978004 +0100
+@@ -84,7 +84,7 @@
+ 
+ 	audio_output_file->frame_bytes = audio_output_file->codec_ctx->frame_size * av_get_bytes_per_sample(DC_AUDIO_SAMPLE_FORMAT) * DC_AUDIO_NUM_CHANNELS;
+ 
+-#ifndef FF_API_AVFRAME_LAVC
++#if 0
+ 	avcodec_get_frame_defaults(audio_output_file->aframe);
+ #else
+ 	av_frame_unref(audio_output_file->aframe);
+--- gpac/applications/dashcast/video_decoder.c~	2014-10-07 23:10:04.000000000 +0200
++++ gpac/applications/dashcast/video_decoder.c	2016-03-23 08:38:02.470233825 +0100
+@@ -244,7 +244,7 @@
+ 			video_data_node->source_number = source_number;
+ 			/* Flush decoder */
+ 			memset(&packet, 0, sizeof(AVPacket));
+-#ifndef FF_API_AVFRAME_LAVC
++#if 0
+ 			avcodec_get_frame_defaults(video_data_node->vframe);
+ #else
+ 			av_frame_unref(video_data_node->vframe);
+@@ -283,7 +283,7 @@
+ 			video_data_node->source_number = source_number;
+ 
+ 			/* Set video frame to default */
+-#ifndef FF_API_AVFRAME_LAVC
++#if 0
+ 			avcodec_get_frame_defaults(video_data_node->vframe);
+ #else
+ 			av_frame_unref(video_data_node->vframe);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gpac.git/commitdiff/705c169208564c95fb7e6e832a1f735aa092db5d



More information about the pld-cvs-commit mailing list