diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-21 00:12:28 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-21 00:12:28 -0200 |
commit | b354a1f61393c7ec251ed2127a30a4e59facf95e (patch) | |
tree | c250b9aeaac1adb3d73c439582461bd5bafe4eb1 /pcr/mediatomb/libavformat.patch | |
parent | 14c7fb9a0df7f551b634e88cae88ca67cf3ab879 (diff) | |
parent | 5d8975d8907023d095a33cb34684804309cd9487 (diff) | |
download | abslibre-b354a1f61393c7ec251ed2127a30a4e59facf95e.tar.gz abslibre-b354a1f61393c7ec251ed2127a30a4e59facf95e.tar.bz2 abslibre-b354a1f61393c7ec251ed2127a30a4e59facf95e.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/mediatomb/libavformat.patch')
-rw-r--r-- | pcr/mediatomb/libavformat.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/mediatomb/libavformat.patch b/pcr/mediatomb/libavformat.patch new file mode 100644 index 000000000..96685ea15 --- /dev/null +++ b/pcr/mediatomb/libavformat.patch @@ -0,0 +1,52 @@ +--- 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) |