From 39fb4ce5a78c499669ef87fe9bf522d08966a43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 2 Jul 2018 18:48:20 +0200 Subject: [PATCH] omxplayer: add patch for ffmpeg-4.0.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Buchmüller --- srcpkgs/omxplayer/patches/ffmpeg-4.0.1.patch | 93 ++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 srcpkgs/omxplayer/patches/ffmpeg-4.0.1.patch diff --git a/srcpkgs/omxplayer/patches/ffmpeg-4.0.1.patch b/srcpkgs/omxplayer/patches/ffmpeg-4.0.1.patch new file mode 100644 index 0000000000..4d5ee5572e --- /dev/null +++ b/srcpkgs/omxplayer/patches/ffmpeg-4.0.1.patch @@ -0,0 +1,93 @@ +--- DllAvFormat.h 2016-06-26 14:51:49.000000000 +0200 ++++ DllAvFormat.h 2018-07-02 18:39:32.237366072 +0200 +@@ -114,7 +114,7 @@ + } + virtual void av_register_all_dont_call() { *(volatile int* )0x0 = 0; } + virtual AVInputFormat *av_find_input_format(const char *short_name) { return ::av_find_input_format(short_name); } +- virtual int url_feof(AVIOContext *s) { return ::url_feof(s); } ++ virtual int url_feof(AVIOContext *s) { return ::avio_feof(s); } + virtual void avformat_close_input(AVFormatContext **s) { ::avformat_close_input(s); } + virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt) { return ::av_read_frame(s, pkt); } + virtual int av_read_play(AVFormatContext *s) { return ::av_read_play(s); } +--- OMXReader.cpp 2016-06-26 14:51:49.000000000 +0200 ++++ OMXReader.cpp 2018-07-02 18:44:32.882381582 +0200 +@@ -1022,7 +1022,7 @@ + { + memset(pkt, 0, sizeof(OMXPacket)); + +- pkt->data = (uint8_t*) malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); ++ pkt->data = (uint8_t*) malloc(size + AV_INPUT_BUFFER_PADDING_SIZE); + if(!pkt->data) + { + free(pkt); +@@ -1030,7 +1030,7 @@ + } + else + { +- memset(pkt->data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE); ++ memset(pkt->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); + pkt->size = size; + pkt->dts = DVD_NOPTS_VALUE; + pkt->pts = DVD_NOPTS_VALUE; +@@ -1239,13 +1239,13 @@ + } + } + +-#ifdef FF_PROFILE_DTS_HD_MA ++#ifdef AV_PROFILE_DTS_HD_MA + /* use profile to determine the DTS type */ + if (stream->codec->codec_id == AV_CODEC_ID_DTS) + { +- if (stream->codec->profile == FF_PROFILE_DTS_HD_MA) ++ if (stream->codec->profile == AV_PROFILE_DTS_HD_MA) + strStreamName = "dtshd_ma"; +- else if (stream->codec->profile == FF_PROFILE_DTS_HD_HRA) ++ else if (stream->codec->profile == AV_PROFILE_DTS_HD_HRA) + strStreamName = "dtshd_hra"; + else + strStreamName = "dca"; +@@ -1348,10 +1348,10 @@ + if (m_streams[i].hints.codec == AV_CODEC_ID_AC3) strcpy(sInfo, "AC3 "); + else if (m_streams[i].hints.codec == AV_CODEC_ID_DTS) + { +-#ifdef FF_PROFILE_DTS_HD_MA +- if (m_streams[i].hints.profile == FF_PROFILE_DTS_HD_MA) ++#ifdef AV_PROFILE_DTS_HD_MA ++ if (m_streams[i].hints.profile == AV_PROFILE_DTS_HD_MA) + strcpy(sInfo, "DTS-HD MA "); +- else if (m_streams[i].hints.profile == FF_PROFILE_DTS_HD_HRA) ++ else if (m_streams[i].hints.profile == AV_PROFILE_DTS_HD_HRA) + strcpy(sInfo, "DTS-HD HRA "); + else + #endif +--- OMXAudioCodecOMX.cpp 2016-06-26 14:51:49.000000000 +0200 ++++ OMXAudioCodecOMX.cpp 2018-07-02 18:46:01.167386137 +0200 +@@ -82,8 +82,8 @@ + m_pCodecContext->debug = 0; + m_pCodecContext->workaround_bugs = 1; + +- if (pCodec->capabilities & CODEC_CAP_TRUNCATED) +- m_pCodecContext->flags |= CODEC_FLAG_TRUNCATED; ++ if (pCodec->capabilities & AV_CODEC_CAP_TRUNCATED) ++ m_pCodecContext->flags |= AV_CODEC_FLAG_TRUNCATED; + + m_channels = 0; + m_pCodecContext->channels = hints.channels; +@@ -115,7 +115,7 @@ + if( hints.extradata && hints.extrasize > 0 ) + { + m_pCodecContext->extradata_size = hints.extrasize; +- m_pCodecContext->extradata = (uint8_t*)m_dllAvUtil.av_mallocz(hints.extrasize + FF_INPUT_BUFFER_PADDING_SIZE); ++ m_pCodecContext->extradata = (uint8_t*)m_dllAvUtil.av_mallocz(hints.extrasize + AV_INPUT_BUFFER_PADDING_SIZE); + memcpy(m_pCodecContext->extradata, hints.extradata, hints.extrasize); + } + +@@ -235,7 +235,7 @@ + + if (m_iBufferOutputAlloced < m_iBufferOutputUsed + outputSize) + { +- m_pBufferOutput = (BYTE*)m_dllAvUtil.av_realloc(m_pBufferOutput, m_iBufferOutputUsed + outputSize + FF_INPUT_BUFFER_PADDING_SIZE); ++ m_pBufferOutput = (BYTE*)m_dllAvUtil.av_realloc(m_pBufferOutput, m_iBufferOutputUsed + outputSize + AV_INPUT_BUFFER_PADDING_SIZE); + m_iBufferOutputAlloced = m_iBufferOutputUsed + outputSize; + } +