[SCM] xjadeo/master: Added patch to build with latest libav.

mira-guest at users.alioth.debian.org mira-guest at users.alioth.debian.org
Tue Sep 30 12:43:52 UTC 2014


The following commit has been merged in the master branch:
commit 9776b7ff61e258bba33af69e0f44c80d93a972ef
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date:   Tue Sep 30 14:40:56 2014 +0200

    Added patch to build with latest libav.

diff --git a/debian/patches/0001-Fix-building-with-Libav-10-11.patch b/debian/patches/0001-Fix-building-with-Libav-10-11.patch
new file mode 100644
index 0000000..183b32f
--- /dev/null
+++ b/debian/patches/0001-Fix-building-with-Libav-10-11.patch
@@ -0,0 +1,66 @@
+From 420a5876bbd1bb0afe99ebd7897b328a91237125 Mon Sep 17 00:00:00 2001
+From: Anton Khirnov <anton at khirnov.net>
+Date: Tue, 30 Sep 2014 08:00:22 +0200
+Subject: [PATCH] Fix building with Libav 10/11.
+
+---
+ src/xjadeo/xjadeo.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/xjadeo/xjadeo.c b/src/xjadeo/xjadeo.c
+index 73e2285..cc84864 100644
+--- a/src/xjadeo/xjadeo.c
++++ b/src/xjadeo/xjadeo.c
+@@ -471,7 +471,7 @@ static uint64_t parse_pts_from_frame (AVFrame *f) {
+ 
+ 	pts = AV_NOPTS_VALUE;
+ 
+-#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 49, 100)
++#if 0
+ 	if (pts == AV_NOPTS_VALUE) {
+ 		pts = av_frame_get_best_effort_timestamp (f);
+ 		if (pts != AV_NOPTS_VALUE) {
+@@ -898,6 +898,7 @@ static int index_frames () {
+ 
+ 		int err = 0;
+ 		int bailout = 100;
++        int64_t pkt_pos = INT64_MIN;
+ 		while (!got_pic && --bailout) {
+ 
+ 			if ((err = av_read_frame (pFormatCtx, &packet)) < 0) {
+@@ -911,6 +912,8 @@ static int index_frames () {
+ 				error |= 32;
+ 				break;
+ 			}
++            if (pkt_pos == INT64_MIN)
++                pkt_pos = packet.pos;
+ 
+ #ifdef USE_DUP_PACKET
+ 			if (av_dup_packet (&packet) < 0) {
+@@ -949,7 +952,7 @@ static int index_frames () {
+ 		if (err < 0 || !bailout) continue;
+ 
+ 		fidx[i].frame_pts = pts;
+-		fidx[i].frame_pos = av_frame_get_pkt_pos (pFrame);
++		fidx[i].frame_pos = pkt_pos;
+ 		if (pts != AV_NOPTS_VALUE) {
+ #if 0 // DEBUG
+ 			printf("FN %"PRId64", PKT-PTS %"PRId64" FRM-PTS: %"PRId64"\n", i, fidx[i].pkt_pts, fidx[i].frame_pts);
+@@ -1319,11 +1322,11 @@ int open_movie (char* file_name) {
+ 	 * hence here AVRational fractions are inverse.
+ 	 */
+ 	framerate = 0;
+-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 100) // 9cf788eca8ba (merge a75f01d7e0)
++#if 1
+ 	{
+-		AVRational fr = av_stream->r_frame_rate;
++		AVRational fr = av_stream->avg_frame_rate;
+ 		if (fr.den > 0 && fr.num > 0) {
+-			framerate = av_q2d (av_stream->r_frame_rate);
++			framerate = av_q2d (av_stream->avg_frame_rate);
+ 			fr_Q.den = fr.num;
+ 			fr_Q.num = fr.den;
+ 		}
+-- 
+2.0.0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6d924d8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-building-with-Libav-10-11.patch

-- 
xjadeo packaging



More information about the pkg-multimedia-commits mailing list