[SCM] harvid/master: Add patch by Anton Khirnov and compile against Libav10 (Closes: #739304)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sat Apr 5 23:29:56 UTC 2014


The following commit has been merged in the master branch:
commit 6de41e2fd41424f3e6dc4826f42b616b8a9b9a58
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Sat Apr 5 19:24:04 2014 -0400

    Add patch by Anton Khirnov and compile against Libav10 (Closes: #739304)

diff --git a/debian/changelog b/debian/changelog
index 78df0b9..2f433ce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+harvid (0.7.3-3) experimental; urgency=low
+
+  * Team upload.
+  * Add patch by Anton Khirnov and compile against Libav10 (Closes: #739304)
+
+ -- Reinhard Tartler <siretart at tauware.de>  Sat, 05 Apr 2014 19:23:05 -0400
+
 harvid (0.7.3-2) unstable; urgency=low
 
   * Team upload.
diff --git a/debian/control b/debian/control
index 0194df7..66ae9ff 100644
--- a/debian/control
+++ b/debian/control
@@ -7,11 +7,11 @@ Uploaders:
  Robin Gareus <robin at gareus.org>
 Build-Depends:
  debhelper (>= 9~),
- libavcodec-dev,
- libavformat-dev,
+ libavcodec-dev (>= 6:10~),
+ libavformat-dev (>= 6:10~),
  libjpeg8-dev | libjpeg62-dev,
  libpng12-dev,
- libswscale-dev,
+ libswscale-dev (>= 6:10~),
  pkg-config
 Homepage: http://x42.github.com/harvid/
 Standards-Version: 3.9.4
diff --git a/debian/patches/libav10.patch b/debian/patches/libav10.patch
new file mode 100644
index 0000000..f64f1b7
--- /dev/null
+++ b/debian/patches/libav10.patch
@@ -0,0 +1,64 @@
+From cff20016b9eb5a7ebd8c1a16a03a6cac365a1bc2 Mon Sep 17 00:00:00 2001
+From: Anton Khirnov <anton at khirnov.net>
+Date: Thu, 6 Feb 2014 08:54:29 +0100
+Subject: [PATCH] ffdecoder: use avg_frame_rate instead of r_frame_rate
+
+r_frame_rate is a guessed number defined as "the least common multiple
+of all framerates in the stream". It has been deprecated and removed in
+new Libav releases.
+
+Use avg_frame_rate instead, which is the average framerate of the
+stream.
+---
+ libharvid/ffdecoder.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/libharvid/ffdecoder.c b/libharvid/ffdecoder.c
+index 5db72aa..beda9ea 100644
+--- a/libharvid/ffdecoder.c
++++ b/libharvid/ffdecoder.c
+@@ -311,9 +311,9 @@ static void ff_get_framerate(void *ptr, TimecodeRate *fr) {
+   }
+   av_stream = ff->pFormatCtx->streams[ff->videoStream];
+ 
+-  if(av_stream->r_frame_rate.den && av_stream->r_frame_rate.num) {
+-    fr->num = av_stream->r_frame_rate.num;
+-    fr->den = av_stream->r_frame_rate.den;
++  if(av_stream->avg_frame_rate.den && av_stream->avg_frame_rate.num) {
++    fr->num = av_stream->avg_frame_rate.num;
++    fr->den = av_stream->avg_frame_rate.den;
+  // if ((ff->framerate < 4 || ff->framerate > 100) && (av_stream->time_base.num && av_stream->time_base.den)) {
+  //   fr->num = av_stream->time_base.den
+  //   fr->den = av_stream->time_base.num;
+@@ -333,8 +333,8 @@ static void ff_set_framerate(ffst *ff) {
+   AVStream *av_stream;
+   av_stream = ff->pFormatCtx->streams[ff->videoStream];
+ 
+-  if(av_stream->r_frame_rate.den && av_stream->r_frame_rate.num) {
+-    ff->framerate = av_q2d(av_stream->r_frame_rate);
++  if(av_stream->avg_frame_rate.den && av_stream->avg_frame_rate.num) {
++    ff->framerate = av_q2d(av_stream->avg_frame_rate);
+     if ((ff->framerate < 4 || ff->framerate > 100) && (av_stream->time_base.num && av_stream->time_base.den))
+       ff->framerate = 1.0/av_q2d(av_stream->time_base);
+   }
+@@ -433,7 +433,7 @@ int ff_open_movie(void *ptr, char *file_name, int render_fmt) {
+   if (avs->nb_frames != 0) {
+     ff->frames = avs->nb_frames;
+   } else if (avs->duration != avs->duration && avs->duration != 0) // ???
+-    ff->frames = avs->duration * av_q2d(avs->r_frame_rate) * av_q2d(avs->time_base);
++    ff->frames = avs->duration * av_q2d(avs->avg_frame_rate) * av_q2d(avs->time_base);
+   else {
+     ff->frames = ff->pFormatCtx->duration * ff->framerate / AV_TIME_BASE;
+   }
+@@ -565,7 +565,7 @@ static int my_seek_frame (ffst *ff, AVPacket *packet, int64_t timestamp) {
+ 
+ #if LIBAVFORMAT_BUILD > 4629 // verify this version
+   timestamp = av_rescale_q(timestamp, c1_Q, v_stream->time_base);
+-  timestamp = av_rescale_q(timestamp, c1_Q, v_stream->r_frame_rate); //< timestamp/=framerate;
++  timestamp = av_rescale_q(timestamp, c1_Q, v_stream->avg_frame_rate); //< timestamp/=framerate;
+ #endif
+ 
+ #if LIBAVFORMAT_BUILD < 4617
+-- 
+1.8.3.2
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ee77a31
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+libav10.patch

-- 
harvid packaging



More information about the pkg-multimedia-commits mailing list