[SCM] mediatomb/master: Apply patch from Jona Schuman to port mediatomb to libav 9 API

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Wed Sep 4 12:56:12 UTC 2013


The following commit has been merged in the master branch:
commit 7cc4f7dc1c7ad85ee480723c1f4efb28405fa4d8
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Wed Sep 4 14:54:47 2013 +0200

    Apply patch from Jona Schuman to port mediatomb to libav 9 API
    
    Closes: #677959
    Thanks: Jona Schuman for the patch

diff --git a/debian/patches/0011_libav_9_support.patch b/debian/patches/0011_libav_9_support.patch
new file mode 100644
index 0000000..fe554d9
--- /dev/null
+++ b/debian/patches/0011_libav_9_support.patch
@@ -0,0 +1,57 @@
+Description: Port to libav 9 API.
+Author: Jona Schuman <jonaschuman at gmail.com>
+Bug-Debian: http://bugs.debian.org/677959
+Last-Update: 2013-09-04
+
+--- mediatomb-0.12.1.orig/src/metadata/ffmpeg_handler.cc	2012-06-18 02:50:35.000000000 -0400
++++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc	2012-06-18 02:59:02.000000000 -0400
+@@ -107,8 +107,8 @@
+ 		return;
+ 	for (const mapping_t *m = mapping; m->avname != NULL; m++)
+ 	{
+-		AVMetadataTag *tag = NULL;
+-		tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++		AVDictionaryEntry *tag = NULL;
++		tag = av_dict_get(pFormatCtx->metadata, m->avname, NULL, 0);
+ 		if (tag && tag->value && tag->value[0])
+ 		{
+ 			log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -278,7 +278,7 @@
+     int x = 0;
+     int y = 0;
+ 
+-	AVFormatContext *pFormatCtx;
++	AVFormatContext *pFormatCtx = avformat_alloc_context();
+ 	
+ 	// Suppress all log messages
+ 	av_log_set_callback(FfmpegNoOutputStub);
+@@ -286,15 +286,15 @@
+ 	// Register all formats and codecs
+     av_register_all();
+ 
+-    // Open video file
+-    if (av_open_input_file(&pFormatCtx, 
+-                          item->getLocation().c_str(), NULL, 0, NULL) != 0)
++	// Open video file
++    if (avformat_open_input(&pFormatCtx, 
++                          item->getLocation().c_str(), NULL, NULL) != 0)
+         return; // Couldn't open file
+ 
+     // Retrieve stream information
+-    if (av_find_stream_info(pFormatCtx) < 0)
++    if (avformat_find_stream_info(pFormatCtx,NULL) < 0)
+     {
+-        av_close_input_file(pFormatCtx);
++        avformat_close_input(&pFormatCtx);
+         return; // Couldn't find stream information
+     }   
+ 	// Add metadata using ffmpeg library calls
+@@ -303,7 +303,7 @@
+ 	addFfmpegResourceFields(item, pFormatCtx, &x, &y);
+ 	
+     // Close the video file
+-    av_close_input_file(pFormatCtx);
++    avformat_close_input(&pFormatCtx);
+ }
+ 
+ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)
diff --git a/debian/patches/series b/debian/patches/series
index de03cde..404e199 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 0009a_libav_0.7_support.patch
 0009b_fix_ffmpeg_metadata.patch
 0010_fix_libmp4v2_build.patch
+0011_libav_9_support.patch

-- 
MediaTomb packaging



More information about the pkg-multimedia-commits mailing list