Package: mediatomb Version: 0.12.1-4 Severity: serious Tags: upstream patch Justification: fails to build from source (but built successfully in the past)
Dear Maintainer, The current version of mediatomb (in wheezy) fails to build from source with the current version of libavformat. * What exactly did you do (or not do) that was effective (or ineffective)? apt-get source mediatomb cd mediatomb-0.12.1 ./configure && make * What was the outcome of this action? ../src/metadata/ffmpeg_handler.cc: In function ‘void addFfmpegMetadataFields(zmm::Ref<CdsItem>, AVFormatContext*)’: ../src/metadata/ffmpeg_handler.cc:110:3: error: ‘AVMetadataTag’ was not declared in this scope ../src/metadata/ffmpeg_handler.cc:110:18: error: ‘tag’ was not declared in this scope ../src/metadata/ffmpeg_handler.cc:111:65: error: ‘av_metadata_get’ was not declared in this scope ../src/metadata/ffmpeg_handler.cc: In member function ‘virtual void FfmpegHandler::fillMetadata(zmm::Ref<CdsItem>)’: ../src/metadata/ffmpeg_handler.cc:291:69: error: ‘av_open_input_file’ was not declared in this scope ../src/metadata/ffmpeg_handler.cc:295:9: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1357) [-Wdeprecated-declarations] ../src/metadata/ffmpeg_handler.cc:295:39: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1357) [-Wdeprecated-declarations] ../src/metadata/ffmpeg_handler.cc:297:9: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations] ../src/metadata/ffmpeg_handler.cc:297:39: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations] ../src/metadata/ffmpeg_handler.cc:306:5: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations] ../src/metadata/ffmpeg_handler.cc:306:35: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations] make[2]: *** [libmediatomb_a-ffmpeg_handler.o] Error 1 make[2]: Leaving directory `/home/jona/sandbox/mediatomb-0.12.1/build' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jona/sandbox/mediatomb-0.12.1' make: *** [all] Error 2 I've attached a patch that replaces the relevant deprecated / deleted function calls. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages mediatomb depends on: ii chromium [www-browser] 18.0.1025.151~r130497-1 ii epiphany-browser [www-browser] 3.4.2-1 ii iceweasel [www-browser] 10.0.5esr-1 ii lynx-cur [www-browser] 2.8.8dev.12-2 ii mediatomb-daemon 0.12.1-4 ii libavformat54:i386 7:0.11-dmo2 mediatomb recommends no packages. mediatomb suggests no packages. -- debconf-show failed
--- 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)