[SCM] harvid/master: Patch refreshed.

mira-guest at users.alioth.debian.org mira-guest at users.alioth.debian.org
Sun Oct 26 18:22:53 UTC 2014


The following commit has been merged in the master branch:
commit ed8959a8fa29b1319c2352e7748f1848baef1424
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date:   Sun Oct 26 19:17:20 2014 +0100

    Patch refreshed.

diff --git a/debian/patches/0001-Fix-build-with-libav-10.patch b/debian/patches/0001-Fix-build-with-libav-10.patch
new file mode 100644
index 0000000..6dc273f
--- /dev/null
+++ b/debian/patches/0001-Fix-build-with-libav-10.patch
@@ -0,0 +1,71 @@
+From c4cb7da2e9727f561f05f515278231a655b31464 Mon Sep 17 00:00:00 2001
+From: Anton Khirnov <anton at khirnov.net>
+Date: Sun, 26 Oct 2014 17:17:33 +0100
+Subject: [PATCH] Fix build with libav 10.
+
+---
+ libharvid/ffdecoder.c | 27 ++-------------------------
+ 1 file changed, 2 insertions(+), 25 deletions(-)
+
+diff --git a/libharvid/ffdecoder.c b/libharvid/ffdecoder.c
+index 1a9728d..d2dfae5 100644
+--- a/libharvid/ffdecoder.c
++++ b/libharvid/ffdecoder.c
+@@ -32,6 +32,7 @@
+ 
+ #include "ffcompat.h"
+ #include <libswscale/swscale.h>
++#include <libavutil/mathematics.h>
+ 
+ #ifndef MAX
+ #define MAX(A,B) ( ( (A) > (B) ) ? (A) : (B) )
+@@ -307,25 +308,14 @@ static void ff_set_framerate(ffst *ff) {
+   ff->tc.num = 0;
+   ff->tc.den = 1;
+ 
+-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 0, 100) // 9cf788eca8ba (merge a75f01d7e0)
+   {
+-    AVRational fr = av_stream->r_frame_rate;
+-    if (fr.den > 0 && fr.num > 0) {
+-      ff->framerate = av_q2d (av_stream->r_frame_rate);
+-      ff->tc.num = fr.num;
+-      ff->tc.den = fr.den;
+-    }
+-  }
+-#else
+-  {
+-    AVRational fr = av_stream_get_r_frame_rate (av_stream);
++    AVRational fr = av_stream->avg_frame_rate;
+     if (fr.den > 0 && fr.num > 0) {
+       ff->framerate = av_q2d (fr);
+       ff->tc.num = fr.num;
+       ff->tc.den = fr.den;
+     }
+   }
+-#endif
+   if (ff->framerate < 1 || ff->framerate > 1000) {
+     AVRational fr = av_stream->avg_frame_rate;
+     if (fr.den > 0 && fr.num > 0) {
+@@ -533,19 +523,6 @@ static uint64_t parse_pts_from_frame (AVFrame *f) {
+ 
+   pts = AV_NOPTS_VALUE;
+ 
+-#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 49, 100)
+-  if (pts == AV_NOPTS_VALUE) {
+-    pts = av_frame_get_best_effort_timestamp (f);
+-    if (pts != AV_NOPTS_VALUE) {
+-      if (!(pts_warn & 1) && want_verbose)
+-	fprintf(stderr, "PTS: Best effort.\n");
+-      pts_warn |= 1;
+-    }
+-  }
+-#else
+-#warning building with libavutil < 51.49.100 is highly discouraged
+-#endif
+-
+   if (pts == AV_NOPTS_VALUE) {
+     pts = f->pkt_pts;
+     if (pts != AV_NOPTS_VALUE) {
+-- 
+2.0.0
+
diff --git a/debian/patches/libav10.patch b/debian/patches/libav10.patch
deleted file mode 100644
index f64f1b7..0000000
--- a/debian/patches/libav10.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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
index ee77a31..31ab1d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-libav10.patch
+0001-Fix-build-with-libav-10.patch

-- 
harvid packaging



More information about the pkg-multimedia-commits mailing list