FreeBSD Bugzilla – Attachment 139045 Details for
Bug 185227
[UPDATE] graphics/osg to v3.2.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 21.63 KB, created by
hardy.schumacher
on 2013-12-27 12:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
hardy.schumacher
Created:
2013-12-27 12:10:00 UTC
Size:
21.63 KB
patch
obsolete
>diff -ruN /usr/ports/graphics/osg/Makefile ./osg/Makefile >--- /usr/ports/graphics/osg/Makefile 2013-11-23 18:16:02.000000000 +0100 >+++ ./osg/Makefile 2013-12-27 12:34:02.000000000 +0100 >@@ -2,16 +2,20 @@ > # $FreeBSD: head/graphics/osg/Makefile 334422 2013-11-20 14:25:28Z nemysis $ > > PORTNAME= osg >-PORTVERSION= 3.0.1 >-PORTREVISION= 8 >+PORTVERSION= 3.2.0 > CATEGORIES= graphics >-MASTER_SITES= http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-${PORTVERSION}/source/ \ >+MASTER_SITES= http://trac.openscenegraph.org/downloads/developer_releases/ \ > http://mirror.amdmi3.ru/distfiles/ > DISTNAME= OpenSceneGraph-${PORTVERSION} > > MAINTAINER= amdmi3@FreeBSD.org > COMMENT= C++ OpenGL scene graph library for real-time rendering > >+LICENSE= OSGPL >+LICENSE_NAME= OpenSceneGraph Public License >+LICENSE_FILE= ${WRKSRC}/LICENSE.txt >+LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept >+ > LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ > libpng.so:${PORTSDIR}/graphics/png \ > libtiff.so:${PORTSDIR}/graphics/tiff >diff -ruN /usr/ports/graphics/osg/distinfo ./osg/distinfo >--- /usr/ports/graphics/osg/distinfo 2012-12-26 19:42:14.000000000 +0100 >+++ ./osg/distinfo 2013-12-27 12:34:58.000000000 +0100 >@@ -1,2 +1,2 @@ >-SHA256 (OpenSceneGraph-3.0.1.zip) = 0c1103574b0a5a27c7d68d43454f1bf9c0cea114a583c42637bc8eb47b1d8296 >-SIZE (OpenSceneGraph-3.0.1.zip) = 6780282 >+SHA256 (OpenSceneGraph-3.2.0.zip) = ceca56e58e9ba245d5f9d0661352ddf405a7cb105341a122c5541b69c0ce032e >+SIZE (OpenSceneGraph-3.2.0.zip) = 7195748 >diff -ruN /usr/ports/graphics/osg/files/patch-include-OpenThreads-Atomic ./osg/files/patch-include-OpenThreads-Atomic >--- /usr/ports/graphics/osg/files/patch-include-OpenThreads-Atomic 2013-09-27 23:01:07.000000000 +0200 >+++ ./osg/files/patch-include-OpenThreads-Atomic 1970-01-01 01:00:00.000000000 +0100 >@@ -1,11 +0,0 @@ >---- include/OpenThreads/Atomic.orig 2011-01-31 12:35:50.000000000 +0100 >-+++ include/OpenThreads/Atomic 2013-09-18 12:41:22.000000000 +0200 >-@@ -241,7 +241,7 @@ >- AtomicPtr::assign(void* ptrNew, const void* const ptrOld) >- { >- #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) >-- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); >-+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); >- #elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) >- return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrOld, (unsigned long)ptrNew); >- #elif defined(_OPENTHREADS_ATOMIC_USE_SUN) >diff -ruN /usr/ports/graphics/osg/files/patch-include-osg-Math ./osg/files/patch-include-osg-Math >--- /usr/ports/graphics/osg/files/patch-include-osg-Math 2013-09-27 23:01:07.000000000 +0200 >+++ ./osg/files/patch-include-osg-Math 1970-01-01 01:00:00.000000000 +0100 >@@ -1,29 +0,0 @@ >---- include/osg/Math.orig 2011-05-26 20:52:08.000000000 +0400 >-+++ include/osg/Math 2013-09-24 22:00:59.252519925 +0400 >-@@ -20,7 +20,7 @@ >- >- //certain math functions were not defined until 10.2 >- //so this code checks the version so it can add in workarounds for older versions. >--#ifdef __APPLE__ >-+#if defined(__APPLE__) >- // Using std::isnan will work for OS X, but use of <cmath> >- // and std:: are not necessarily portible with other systems so >- // the include of <cmath> is isolated here. >-@@ -38,6 +38,8 @@ >- #define APPLE_PRE_10_2 >- #endif >- #endif >-+#elif defined(__FreeBSD__) >-+#include <cmath> >- #endif >- >- #if defined(_MSC_VER) >-@@ -207,7 +209,7 @@ >- inline bool isNaN(float v) { return _isnan(v)!=0; } >- inline bool isNaN(double v) { return _isnan(v)!=0; } >- #else >-- #if defined(__APPLE__) >-+ #if defined(__APPLE__) || defined(__FreeBSD__) >- inline bool isNaN(float v) { return std::isnan(v); } >- inline bool isNaN(double v) { return std::isnan(v); } >- #else >diff -ruN /usr/ports/graphics/osg/files/patch-libav07 ./osg/files/patch-libav07 >--- /usr/ports/graphics/osg/files/patch-libav07 2013-11-07 19:22:38.000000000 +0100 >+++ ./osg/files/patch-libav07 1970-01-01 01:00:00.000000000 +0100 >@@ -1,22 +0,0 @@ >-diff -ruN src/osgPlugins/ffmpeg/FFmpegHeaders.hpp src/osgPlugins/ffmpeg/FFmpegHeaders.hpp >---- src/osgPlugins/ffmpeg/FFmpegHeaders.hpp 2011-06-17 10:41:56.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegHeaders.hpp 2011-11-17 19:44:33.194607494 +0100 >-@@ -9,12 +9,13 @@ >- #define FF_API_OLD_SAMPLE_FMT 0 >- #include <errno.h> // for error codes defined in avformat.h >- #include <stdint.h> >--#include <avcodec.h> >--#include <avformat.h> >--#include <avdevice.h> >-+#include <libavcodec/avcodec.h> >-+#include <libavformat/avformat.h> >-+#include <libavdevice/avdevice.h> >-+#include <libavutil/mathematics.h> >- >--#ifdef USE_SWSCALE >-- #include <swscale.h> >-+#ifdef USE_SWSCALE >-+ #include <libswscale/swscale.h> >- #endif >- >- } >diff -ruN /usr/ports/graphics/osg/files/patch-libav9 ./osg/files/patch-libav9 >--- /usr/ports/graphics/osg/files/patch-libav9 2013-11-07 19:22:38.000000000 +0100 >+++ ./osg/files/patch-libav9 1970-01-01 01:00:00.000000000 +0100 >@@ -1,284 +0,0 @@ >-Patch by lu_zero >-https://bugs.gentoo.org/show_bug.cgi?id=439606 >-upstream svn rev. 13335 contains similar changes. >-no need to upstream this patch. >- >-diff -burN CMakeModules/FindFFmpeg.cmake CMakeModules/FindFFmpeg.cmake >---- CMakeModules/FindFFmpeg.cmake 2011-04-19 13:40:22.000000000 +0200 >-+++ CMakeModules/FindFFmpeg.cmake 2012-11-22 13:59:28.303401170 +0100 >-@@ -131,20 +131,16 @@ >- SET(FFMPEG_FOUND "YES") >- >- SET(FFMPEG_INCLUDE_DIRS >-- ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat >-- ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/libavdevice >-- ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/libavcodec >-- ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavutil >-+ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} >-+ ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} >-+ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} >-+ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} >- ) >- >- IF (FFMPEG_STDINT_INCLUDE_DIR) >- SET(FFMPEG_INCLUDE_DIRS >- ${FFMPEG_INCLUDE_DIRS} >- ${FFMPEG_STDINT_INCLUDE_DIR} >-- ${FFMPEG_STDINT_INCLUDE_DIR}/libavformat >-- ${FFMPEG_STDINT_INCLUDE_DIR}/libavdevice >-- ${FFMPEG_STDINT_INCLUDE_DIR}/libavcodec >-- ${FFMPEG_STDINT_INCLUDE_DIR}/libavutil >- ) >- ENDIF() >- >-diff -burN src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp >---- src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2011-04-19 13:40:22.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2012-11-22 15:03:53.668601596 +0100 >-@@ -89,7 +89,7 @@ >- // m_context->flags |= CODEC_FLAG_TRUNCATED; >- >- // Open codec >-- if (avcodec_open(m_context, p_codec) < 0) >-+ if (avcodec_open2(m_context, p_codec, NULL) < 0) >- throw std::runtime_error("avcodec_open() failed"); >- } >- >-Binary files src/osgPlugins/ffmpeg/.FFmpegDecoderAudio.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoderAudio.cpp.swp differ >-diff -burN src/osgPlugins/ffmpeg/FFmpegDecoder.cpp src/osgPlugins/ffmpeg/FFmpegDecoder.cpp >---- src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2011-07-15 12:25:12.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2012-11-22 15:59:39.569775078 +0100 >-@@ -64,21 +64,12 @@ >- >- OSG_NOTICE<<"Attempting to stream "<<filename<<std::endl; >- >-- AVFormatParameters formatParams; >-- memset(&formatParams, 0, sizeof(AVFormatParameters)); >- AVInputFormat *iformat; >-+ AVDictionary *options = NULL; >- >-- formatParams.channel = 0; >-- formatParams.standard = 0; >--#if 1 >-- formatParams.width = 320; >-- formatParams.height = 240; >--#else >-- formatParams.width = 640; >-- formatParams.height = 480; >--#endif >-- formatParams.time_base.num = 1; >-- formatParams.time_base.den = 30; >-+ av_dict_set(&options, "video_size", "320x240", 0); >-+ >-+ av_dict_set(&options, "framerate", "1/30", 0); >- >- std::string format = "video4linux2"; >- iformat = av_find_input_format(format.c_str()); >-@@ -92,7 +83,7 @@ >- OSG_NOTICE<<"Failed to find input format: "<<format<<std::endl; >- } >- >-- int error = av_open_input_file(&p_format_context, filename.c_str(), iformat, 0, &formatParams); >-+ int error = avformat_open_input(&p_format_context, filename.c_str(), iformat, &options); >- if (error != 0) >- { >- std::string error_str; >-@@ -110,21 +101,21 @@ >- default: error_str = "Unknown error"; break; >- } >- >-- throw std::runtime_error("av_open_input_file() failed : " + error_str); >-+ throw std::runtime_error("avformat_open_input() failed : " + error_str); >- } >- } >- else >- { >- AVInputFormat* av_format = (parameters ? parameters->getFormat() : 0); >-- AVFormatParameters* av_params = (parameters ? parameters->getFormatParameter() : 0); >-- if (av_open_input_file(&p_format_context, filename.c_str(), av_format, 0, av_params) !=0 ) >-+ AVDictionary* av_options = (parameters ? parameters->getOptions() : NULL); >-+ if (avformat_open_input(&p_format_context, filename.c_str(), av_format, &av_options) !=0 ) >- throw std::runtime_error("av_open_input_file() failed"); >- } >- >- m_format_context.reset(p_format_context); >- >- // Retrieve stream info >-- if (av_find_stream_info(p_format_context) < 0) >-+ if (avformat_find_stream_info(p_format_context, NULL) < 0) >- throw std::runtime_error("av_find_stream_info() failed"); >- >- m_duration = double(m_format_context->duration) / AV_TIME_BASE; >-@@ -134,7 +125,7 @@ >- m_clocks.reset(m_start); >- >- // Dump info to stderr >-- dump_format(p_format_context, 0, filename.c_str(), false); >-+ av_dump_format(p_format_context, 0, filename.c_str(), false); >- >- // Find and open the first video and audio streams (note that audio stream is optional and only opened if possible) >- >-@@ -292,7 +283,7 @@ >- // Read the next frame packet >- if (av_read_frame(m_format_context.get(), &packet) < 0) >- { >-- if (url_ferror(m_format_context->pb) == 0) >-+ if (m_format_context->pb->eof_reached == 0) >- end_of_stream = true; >- else >- throw std::runtime_error("av_read_frame() failed"); >-Binary files src/osgPlugins/ffmpeg/.FFmpegDecoder.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoder.cpp.swp differ >-diff -burN src/osgPlugins/ffmpeg/FFmpegDecoder.hpp src/osgPlugins/ffmpeg/FFmpegDecoder.hpp >---- src/osgPlugins/ffmpeg/FFmpegDecoder.hpp 2011-04-19 13:40:22.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegDecoder.hpp 2012-11-22 15:59:18.895774005 +0100 >-@@ -46,8 +46,8 @@ >- { >- if (_ptr) >- { >-- OSG_NOTICE<<"Calling av_close_input_file("<<_ptr<<")"<<std::endl; >-- av_close_input_file(_ptr); >-+ OSG_NOTICE<<"Calling avformat_close_input("<<_ptr<<")"<<std::endl; >-+ avformat_close_input(&_ptr); >- } >- _ptr = 0; >- } >-@@ -151,8 +151,7 @@ >- >- inline double FFmpegDecoder::creation_time() const >- { >-- if(m_format_context) return m_format_context->timestamp; >-- else return HUGE_VAL; >-+ return HUGE_VAL; >- } >- >- inline double FFmpegDecoder::duration() const >-diff -burN src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp >---- src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2011-04-19 13:40:22.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp 2012-11-22 16:01:30.906780849 +0100 >-@@ -83,7 +83,7 @@ >- m_context = stream->codec; >- >- // Trust the video size given at this point >-- // (avcodec_open seems to sometimes return a 0x0 size) >-+ // (avcodec_open2 seems to sometimes return a 0x0 size) >- m_width = m_context->width; >- m_height = m_context->height; >- findAspectRatio(); >-@@ -105,8 +105,8 @@ >- // m_context->flags |= CODEC_FLAG_TRUNCATED; >- >- // Open codec >-- if (avcodec_open(m_context, m_codec) < 0) >-- throw std::runtime_error("avcodec_open() failed"); >-+ if (avcodec_open2(m_context, m_codec, NULL) < 0) >-+ throw std::runtime_error("avcodec_open2() failed"); >- >- // Allocate video frame >- m_frame.reset(avcodec_alloc_frame()); >-Binary files src/osgPlugins/ffmpeg/.FFmpegDecoderVideo.cpp.swp and src/osgPlugins/ffmpeg/.FFmpegDecoderVideo.cpp.swp differ >-diff -burN src/osgPlugins/ffmpeg/FFmpegParameters.cpp src/osgPlugins/ffmpeg/FFmpegParameters.cpp >---- src/osgPlugins/ffmpeg/FFmpegParameters.cpp 2011-07-15 12:25:12.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegParameters.cpp 2012-11-22 17:20:09.019025477 +0100 >-@@ -8,7 +8,7 @@ >- #if LIBAVCODEC_VERSION_MAJOR >= 53 >- extern "C" >- { >-- #include <parseutils.h> >-+ #include <libavutil/parseutils.h> >- } >- #define av_parse_video_frame_size av_parse_video_size >- #define av_parse_video_frame_rate av_parse_video_rate >-@@ -19,7 +19,7 @@ >- >- extern "C" >- { >-- #include <pixdesc.h> >-+ #include <libavutil/pixdesc.h> >- } >- >- inline PixelFormat osg_av_get_pix_fmt(const char *name) { return av_get_pix_fmt(name); } >-@@ -34,14 +34,15 @@ >- >- >- FFmpegParameters::FFmpegParameters() : >-- m_format(0) >--{ >-- memset(&m_parameters, 0, sizeof(m_parameters)); >--} >-+ m_format(0), >-+ m_options(NULL) >-+{} >- >- >- FFmpegParameters::~FFmpegParameters() >--{} >-+{ >-+ av_dict_free(&m_options); >-+} >- >- >- void FFmpegParameters::parse(const std::string& name, const std::string& value) >-@@ -59,40 +60,19 @@ >- } >- else if (name == "pixel_format") >- { >-- m_parameters.pix_fmt = osg_av_get_pix_fmt(value.c_str()); >-+ av_dict_set(&m_options, "pixel_format", value.c_str(), 0); >- } >- else if (name == "frame_size") >- { >-- int frame_width = 0, frame_height = 0; >-- if (av_parse_video_frame_size(&frame_width, &frame_height, value.c_str()) < 0) >-- { >-- OSG_NOTICE<<"Failed to apply frame size: "<<value.c_str()<<std::endl; >-- return; >-- } >-- if ((frame_width % 2) != 0 || (frame_height % 2) != 0) >-- { >-- OSG_NOTICE<<"Frame size must be a multiple of 2: "<<frame_width<<"x"<<frame_height<<std::endl; >-- return; >-- } >-- m_parameters.width = frame_width; >-- m_parameters.height = frame_height; >-+ av_dict_set(&m_options, "video_size", value.c_str(), 0); >- } >- else if (name == "frame_rate") >- { >-- AVRational frame_rate; >-- if (av_parse_video_frame_rate(&frame_rate, value.c_str()) < 0) >-- { >-- OSG_NOTICE<<"Failed to apply frame rate: "<<value.c_str()<<std::endl; >-- return; >-- } >-- m_parameters.time_base.den = frame_rate.num; >-- m_parameters.time_base.num = frame_rate.den; >-+ av_dict_set(&m_options, "framerate", value.c_str(), 0); >- } >- else if (name == "audio_sample_rate") >- { >-- int audio_sample_rate = 44100; >-- std::stringstream ss(value); ss >> audio_sample_rate; >-- m_parameters.sample_rate = audio_sample_rate; >-+ av_dict_set(&m_options, "sample_rate", value.c_str(), 0); >- } >- } >- >-diff -burN src/osgPlugins/ffmpeg/FFmpegParameters.hpp src/osgPlugins/ffmpeg/FFmpegParameters.hpp >---- src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2011-04-19 13:40:22.000000000 +0200 >-+++ src/osgPlugins/ffmpeg/FFmpegParameters.hpp 2012-11-22 15:23:27.490662455 +0100 >-@@ -21,14 +21,14 @@ >- bool isFormatAvailable() const { return m_format!=NULL; } >- >- AVInputFormat* getFormat() { return m_format; } >-- AVFormatParameters* getFormatParameter() { return &m_parameters; } >-+ AVDictionary* getOptions() { return m_options; } >- >- void parse(const std::string& name, const std::string& value); >- >- protected: >- >- AVInputFormat* m_format; >-- AVFormatParameters m_parameters; >-+ AVDictionary* m_options; >- }; >- >- >diff -ruN /usr/ports/graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp ./osg/files/patch-src-OpenThreads-common-Atomic.cpp >--- /usr/ports/graphics/osg/files/patch-src-OpenThreads-common-Atomic.cpp 2013-09-27 23:01:07.000000000 +0200 >+++ ./osg/files/patch-src-OpenThreads-common-Atomic.cpp 1970-01-01 01:00:00.000000000 +0100 >@@ -1,11 +0,0 @@ >---- src/OpenThreads/common/Atomic.cpp.orig 2011-04-19 13:40:22.000000000 +0200 >-+++ src/OpenThreads/common/Atomic.cpp 2013-09-18 11:26:03.000000000 +0200 >-@@ -143,7 +143,7 @@ >- AtomicPtr::assign(void* ptrNew, const void* const ptrOld) >- { >- #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) >-- return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); >-+ return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); >- #elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) >- return ptrOld == InterlockedCompareExchangePointer((PVOID volatile*)&_ptr, (PVOID)ptrNew, (PVOID)ptrOld); >- #elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) >diff -ruN /usr/ports/graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp ./osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp >--- /usr/ports/graphics/osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp 2013-11-07 19:22:38.000000000 +0100 >+++ ./osg/files/patch-src-osgPlugins-ffmpeg-FFmpegDecoderAudio.cpp 1970-01-01 01:00:00.000000000 +0100 >@@ -1,11 +0,0 @@ >---- src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp.orig 2013-10-28 13:22:11.997950234 -0200 >-+++ src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2013-10-28 13:22:39.838945189 -0200 >-@@ -9,6 +9,8 @@ >- //#include <iostream> >- >- >-+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio >-+ >- >- namespace osgFFmpeg { >- >diff -ruN /usr/ports/graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c ./osg/files/patch-src-osgPlugins-xine-video__out__rgb.c >--- /usr/ports/graphics/osg/files/patch-src-osgPlugins-xine-video__out__rgb.c 2013-07-14 12:32:04.000000000 +0200 >+++ ./osg/files/patch-src-osgPlugins-xine-video__out__rgb.c 1970-01-01 01:00:00.000000000 +0100 >@@ -1,98 +0,0 @@ >---- src/osgPlugins/xine/video_out_rgb.c.orig >-+++ src/osgPlugins/xine/video_out_rgb.c >-@@ -51,6 +51,11 @@ >- #include "xine/video_out.h" >- #include "video_out_rgb.h" >- >-+#if !(XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)) >-+#define round round_not >-+#include <libavutil/mem.h> >-+#undef round >-+#endif >- >- #define THIS "video_out_rgb" >- >-@@ -2235,9 +2240,15 @@ rgbout_frame_dispose(vo_frame_t* vo_fram >- >- EVAL(vo_frame != NULL) >- >-+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) >- release(frame->chunk[0]); >- release(frame->chunk[1]); >- release(frame->chunk[2]); >-+#else >-+ av_freep(frame->chunk[0]); >-+ av_freep(frame->chunk[1]); >-+ av_freep(frame->chunk[2]); >-+#endif >- free(frame); >- >- FAILURE: >-@@ -2301,9 +2312,15 @@ rgbout_update_frame_format(vo_driver_t* >- this->frame_width = frame->width; >- this->frame_height = frame->height; >- >-+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) >- release(frame->chunk[0]); >- release(frame->chunk[1]); >- release(frame->chunk[2]); >-+#else >-+ av_freep(frame->chunk[0]); >-+ av_freep(frame->chunk[1]); >-+ av_freep(frame->chunk[2]); >-+#endif >- >- CHECK_FRAME: >- switch(frame->format) >-@@ -2320,6 +2337,7 @@ CHECK_FRAME: >- frame->vo_frame.pitches[0] = (frame->width > 7) ? frame->width : 8; >- frame->vo_frame.pitches[1] = (frame->width > 15) ? (frame->width >> 1) : 8; >- frame->vo_frame.pitches[2] = frame->vo_frame.pitches[1]; >-+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) >- frame->vo_frame.base[0] = (uint8_t*) xine_xmalloc_aligned(16, >- frame->vo_frame.pitches[0] * frame->height, >- &(frame->chunk[0])); >-@@ -2329,6 +2347,14 @@ CHECK_FRAME: >- frame->vo_frame.base[2] = (uint8_t*) xine_xmalloc_aligned(16, >- frame->vo_frame.pitches[2] * (frame->height >> 1), >- &(frame->chunk[2])); >-+#else >-+ frame->vo_frame.base[0] = (uint8_t*)(frame->chunk[0] = >-+ av_mallocz(frame->vo_frame.pitches[0] * frame->height)); >-+ frame->vo_frame.base[1] = (uint8_t*)(frame->chunk[1] = >-+ av_mallocz(frame->vo_frame.pitches[1] * (frame->height >> 1))); >-+ frame->vo_frame.base[2] = (uint8_t*)(frame->chunk[2] = >-+ av_mallocz(frame->vo_frame.pitches[2] * (frame->height >> 1))); >-+#endif >- } >- break; >- >-@@ -2344,9 +2370,14 @@ CHECK_FRAME: >- frame->vo_frame.pitches[0] = (frame->width > 3) ? (frame->width << 1) : 8; >- frame->vo_frame.pitches[1] = 0; >- frame->vo_frame.pitches[2] = 0; >-+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) >- frame->vo_frame.base[0] = (uint8_t*) xine_xmalloc_aligned(16, >- frame->vo_frame.pitches[0] * frame->height, >- &(frame->chunk[0])); >-+#else >-+ frame->vo_frame.base[0] = (uint8_t*)(frame->chunk[0] = >-+ av_mallocz(frame->vo_frame.pitches[0] * frame->height)); >-+#endif >- frame->vo_frame.base[1] = NULL; >- frame->vo_frame.base[2] = NULL; >- } >-@@ -2767,8 +2798,13 @@ init_class(xine_t* xine, void* vo_visual >- clear(rgb_class, sizeof(rgbout_class_t)); >- >- rgb_class->driver_class.open_plugin = open_plugin; >-+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) >- rgb_class->driver_class.get_identifier = get_identifier; >- rgb_class->driver_class.get_description = get_description; >-+#else >-+ rgb_class->driver_class.identifier = get_identifier(NULL); >-+ rgb_class->driver_class.description = get_description(NULL); >-+#endif >- rgb_class->driver_class.dispose = dispose_class; >- >- return(rgb_class);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 185227
: 139045