commit e7c9eb3f00c85953953940667c72cdb076f10533 Author: Jakub Bogusz <qbo...@pld-linux.org> Date: Sat Jun 16 21:36:57 2018 +0200
- added abs patch (fix ambiguous std::abs() usage) - added ffmpeg4 patch (more deprecations removed from ffmpeg 4) mpeg4ip-abs.patch | 31 +++++++++++++++++++++++++++++++ mpeg4ip-ffmpeg4.patch | 20 ++++++++++++++++++++ mpeg4ip.spec | 4 ++++ 3 files changed, 55 insertions(+) --- diff --git a/mpeg4ip.spec b/mpeg4ip.spec index c205d89..01861fd 100644 --- a/mpeg4ip.spec +++ b/mpeg4ip.spec @@ -30,6 +30,8 @@ Patch10: %{name}-memset.patch Patch11: %{name}-ffmpeg2.patch Patch12: %{name}-ffmpeg3.patch Patch13: %{name}-lame.patch +Patch14: %{name}-abs.patch +Patch15: %{name}-ffmpeg4.patch URL: http://mpeg4ip.sourceforge.net/ BuildRequires: SDL-devel BuildRequires: a52dec-libs-devel @@ -166,6 +168,8 @@ Ten pakiet zawiera serwer mp4. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 +%patch15 -p1 %build cd lib/SDLAudio diff --git a/mpeg4ip-abs.patch b/mpeg4ip-abs.patch new file mode 100644 index 0000000..272ef54 --- /dev/null +++ b/mpeg4ip-abs.patch @@ -0,0 +1,31 @@ +--- mpeg4ip-1.6.1/server/mp4live/audio_oss_source.cpp.orig 2005-09-08 00:28:01.000000000 +0200 ++++ mpeg4ip-1.6.1/server/mp4live/audio_oss_source.cpp 2018-06-16 19:32:40.426353294 +0200 +@@ -265,7 +265,7 @@ + + rc = ioctl(m_audioDevice, SNDCTL_DSP_SPEED, &samplingRate); + +- if (rc < 0 || abs(samplingRate - targetSamplingRate) > 1) { ++ if (rc < 0 || abs((int32_t)samplingRate - (int32_t)targetSamplingRate) > 1) { + error_message("Couldn't set sampling rate for %s", deviceName); + close(m_audioDevice); + return false; +@@ -450,7 +450,7 @@ + rc = ioctl(audioDevice, SNDCTL_DSP_SPEED, &samplingRate); + + // invalid sampling rate, allow deviation of 1 sample/sec +- if (rc < 0 || abs(samplingRate - targetRate) > 1) { ++ if (rc < 0 || abs((int32_t)samplingRate - (int32_t)targetRate) > 1) { + debug_message("audio device %s doesn't support sampling rate %u", + m_deviceName, targetRate); + continue; +--- mpeg4ip-1.6.1/server/mp4live/audio_oss_source.h.orig 2018-06-16 19:30:52.213950913 +0200 ++++ mpeg4ip-1.6.1/server/mp4live/audio_oss_source.h 2018-06-16 19:30:55.410787025 +0200 +@@ -104,7 +104,7 @@ + return rate; + } + int32_t calc; +- calc = abs(m_samplingRates[ix] - rate); ++ calc = abs((int32_t)m_samplingRates[ix] - (int32_t)rate); + if (calc < diff) { + diff = calc; + ret_rate = m_samplingRates[ix]; diff --git a/mpeg4ip-ffmpeg4.patch b/mpeg4ip-ffmpeg4.patch new file mode 100644 index 0000000..3f6106f --- /dev/null +++ b/mpeg4ip-ffmpeg4.patch @@ -0,0 +1,20 @@ +--- mpeg4ip-1.6.1/server/mp4live/video_ffmpeg.cpp.orig 2018-06-16 19:17:41.565376532 +0200 ++++ mpeg4ip-1.6.1/server/mp4live/video_ffmpeg.cpp 2018-06-16 21:25:49.975952067 +0200 +@@ -125,7 +125,7 @@ + #else + m_avctx->time_base = (AVRational){1, (int)(Profile()->GetFloatValue(CFG_VIDEO_FRAME_RATE) + .5)}; + m_avctx->pix_fmt = AV_PIX_FMT_YUV420P; +- m_avctx->me_method = ME_EPZS; ++ // ME_EPZS is the default for MPEG formats + #endif + if (Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH) > 0 && + Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_HEIGHT) > 0) { +@@ -185,7 +185,7 @@ + m_key_frame_count = m_avctx->gop_size = (int) + ((Profile()->GetFloatValue(CFG_VIDEO_FRAME_RATE)+0.5) + * Profile()->GetFloatValue(CFG_VIDEO_KEY_FRAME_INTERVAL)); +- m_avctx->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ m_avctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + debug_message("key frame count is %d", m_key_frame_count); + } + m_count = 0; ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/mpeg4ip.git/commitdiff/e7c9eb3f00c85953953940667c72cdb076f10533 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit