[SCM] kodi/master: Use avformat_flush(), it is now exported by FFmpeg

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Sat Mar 28 11:24:41 UTC 2015


The following commit has been merged in the master branch:
commit 590015a47211ffb77388e48fe409c21f5ed001c4
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Sat Mar 21 01:31:31 2015 +0100

    Use avformat_flush(), it is now exported by FFmpeg

diff --git a/debian/control b/debian/control
index 5489f1c..6197dbd 100644
--- a/debian/control
+++ b/debian/control
@@ -89,7 +89,7 @@ Build-Depends: debhelper (>= 9~),
  default-jre,
  libbluray-dev,
  libva-dev [!armel !armhf !mipsel !mips],
- libavcodec-ffmpeg-dev (>= 7:2.4.3),
+ libavcodec-ffmpeg-dev (>= 7:2.6.0),
  libavfilter-ffmpeg-dev,
  libavformat-ffmpeg-dev,
  libavresample-ffmpeg-dev,
diff --git a/debian/patches/01-Stop-using-internal-ffmpeg-functions.patch b/debian/patches/01-Stop-using-internal-ffmpeg-functions.patch
deleted file mode 100644
index 6d4ca67..0000000
--- a/debian/patches/01-Stop-using-internal-ffmpeg-functions.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-@@ -535,11 +535,80 @@
-   Open(pInputStream, m_streaminfo);
- }
- 
-+// From DllAvFormat.c removed in a478d9b8
-+static void free_packet_buffer(AVPacketList **pkt_buf, AVPacketList **pkt_buf_end)
-+{
-+    while (*pkt_buf) {
-+        AVPacketList *pktl = *pkt_buf;
-+        *pkt_buf = pktl->next;
-+        av_free_packet(&pktl->pkt);
-+        av_freep(&pktl);
-+    }
-+    *pkt_buf_end = NULL;
-+}
-+
-+/* XXX: suppress the packet queue */
-+static void flush_packet_queue(AVFormatContext *s)
-+{
-+    free_packet_buffer(&s->parse_queue,       &s->parse_queue_end);
-+    free_packet_buffer(&s->packet_buffer,     &s->packet_buffer_end);
-+    free_packet_buffer(&s->raw_packet_buffer, &s->raw_packet_buffer_end);
-+
-+    s->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE;
-+}
-+
-+/* Taken from libavformat/utils.c
-+ * Original name is ff_read_frame_flush
-+ * */
-+static void xbmc_read_frame_flush(AVFormatContext *s)
-+{
-+    AVStream *st;
-+    int i, j;
-+
-+    flush_packet_queue(s);
-+
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(54,0,0)
-+    s->cur_st = NULL;
-+#endif
-+
-+    /* for each stream, reset read state */
-+    for(i = 0; i < s->nb_streams; i++) {
-+        st = s->streams[i];
-+
-+        if (st->parser) {
-+            av_parser_close(st->parser);
-+            st->parser = NULL;
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(54,0,0)
-+            av_free_packet(&st->cur_pkt);
-+#endif
-+        }
-+        st->last_IP_pts = AV_NOPTS_VALUE;
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(54,0,0)
-+        st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */
-+        st->reference_dts = AV_NOPTS_VALUE;
-+        /* fail safe */
-+        st->cur_ptr = NULL;
-+        st->cur_len = 0;
-+#else
-+#define RELATIVE_TS_BASE (INT64_MAX - (1LL<<48))
-+        if(st->first_dts == AV_NOPTS_VALUE) st->cur_dts = RELATIVE_TS_BASE;
-+        else                                st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55,0,0)
-+        st->reference_dts = AV_NOPTS_VALUE;
-+#endif
-+
-+        st->probe_packets = MAX_PROBE_PACKETS;
-+#endif
-+
-+        for(j=0; j<MAX_REORDER_DELAY+1; j++)
-+            st->pts_buffer[j]= AV_NOPTS_VALUE;
-+    }
-+}
-+
- void CDVDDemuxFFmpeg::Flush()
- {
--  // naughty usage of an internal ffmpeg function
-   if (m_pFormatContext)
--    av_read_frame_flush(m_pFormatContext);
-+    xbmc_read_frame_flush(m_pFormatContext);
- 
-   m_currentPts = DVD_NOPTS_VALUE;
- 
diff --git a/debian/patches/01-ffmpeg-bump-to-2.6.patch b/debian/patches/01-ffmpeg-bump-to-2.6.patch
new file mode 100644
index 0000000..3052bcb
--- /dev/null
+++ b/debian/patches/01-ffmpeg-bump-to-2.6.patch
@@ -0,0 +1,43 @@
+From f122e4fdd7971bbbbeab46c295ff23373d49bdc3 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Sat, 7 Mar 2015 10:03:43 +0100
+Subject: [PATCH] [ffmpeg] bump to 2.6
+
+---
+ configure.in                                        | 12 ++++++------
+ tools/depends/target/ffmpeg/FFMPEG-VERSION          |  2 +-
+ xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |  2 +-
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/configure.in
++++ b/configure.in
+@@ -1683,12 +1683,12 @@
+ fi
+ 
+ # FFmpeg
+-FFMPEG_LIBNAMES="libavcodec >= 56.1.100
+-                 libavfilter >= 5.1.100
+-                 libavformat >= 56.4.101
+-                 libavutil >= 54.7.100
+-                 libpostproc >= 53.0.100
+-                 libswscale >= 3.0.100
++FFMPEG_LIBNAMES="libavcodec >= 56.26.100
++                 libavfilter >= 5.11.102
++                 libavformat >= 56.25.101
++                 libavutil >= 54.20.100
++                 libpostproc >= 53.3.100
++                 libswscale >= 3.1.101
+                  libswresample >= 1.1.100"
+ 
+ ffmpeg_build="${abs_top_srcdir}/tools/depends/target/ffmpeg"
+--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -541,7 +541,7 @@
+ {
+   // naughty usage of an internal ffmpeg function
+   if (m_pFormatContext)
+-    av_read_frame_flush(m_pFormatContext);
++    avformat_flush(m_pFormatContext);
+ 
+   m_currentPts = DVD_NOPTS_VALUE;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index c312c7c..1c82cba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,7 +5,7 @@
 0005-mips-Don-t-use-ASM-rounding-on-MIPS.patch
 0006-mips-Fix-build-with-using-OpenGL-rendering.patch
 0007-mips-Fix-addon-shared-library-naming.patch
-01-Stop-using-internal-ffmpeg-functions.patch
+01-ffmpeg-bump-to-2.6.patch
 03-privacy.patch
 04-differentiate-from-vanilla-Kodi.patch
 06-use-external-libraries.patch

-- 
kodi packaging



More information about the pkg-multimedia-commits mailing list