aboutsummaryrefslogtreecommitdiffstats
path: root/community/omxplayer/issue-297.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-07 13:56:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-07 13:56:09 +0000
commit69e0f45f2280af0ef8e2f192363ebd3bfbc42eb3 (patch)
tree08dd1ffea0bdd6d5e425290ce7aee76efba37d46 /community/omxplayer/issue-297.patch
parent26aa4de397292ac7cf30da476e1909e4129f340b (diff)
downloadaports-69e0f45f2280af0ef8e2f192363ebd3bfbc42eb3.tar.bz2
aports-69e0f45f2280af0ef8e2f192363ebd3bfbc42eb3.tar.xz
{main => community}/omxplayer: move
Diffstat (limited to 'community/omxplayer/issue-297.patch')
-rw-r--r--community/omxplayer/issue-297.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/community/omxplayer/issue-297.patch b/community/omxplayer/issue-297.patch
new file mode 100644
index 0000000000..4a2cf1d50a
--- /dev/null
+++ b/community/omxplayer/issue-297.patch
@@ -0,0 +1,78 @@
+diff --git a/OMXReader.cpp b/OMXReader.cpp
+index df15a01..97ed20f 100644
+--- a/OMXReader.cpp
++++ b/OMXReader.cpp
+@@ -261,9 +261,6 @@ bool OMXReader::Open(std::string filename, bool dump_format, bool live /* =false
+ if(/*m_bAVI || */m_bMatroska)
+ m_pFormatContext->max_analyze_duration = 0;
+
+- if (live)
+- m_pFormatContext->flags |= AVFMT_FLAG_NOBUFFER;
+-
+ result = m_dllAvFormat.avformat_find_stream_info(m_pFormatContext, NULL);
+ if(result < 0)
+ {
+diff --git a/OMXVideo.cpp b/OMXVideo.cpp
+index acd055e..b69f451 100644
+--- a/OMXVideo.cpp
++++ b/OMXVideo.cpp
+@@ -670,6 +670,8 @@ bool COMXVideo::Open(OMXClock *clock, const OMXVideoConfig &config)
+ float fAspect = m_config.hints.aspect ? (float)m_config.hints.aspect / (float)m_config.hints.width * (float)m_config.hints.height : 1.0f;
+ m_pixel_aspect = fAspect / m_config.display_aspect;
+
++ PortSettingsChanged();
++
+ return true;
+ }
+
+diff --git a/omxplayer.cpp b/omxplayer.cpp
+index c03760b..071fb60 100644
+--- a/omxplayer.cpp
++++ b/omxplayer.cpp
+@@ -1642,30 +1642,33 @@ int main(int argc, char *argv[])
+ latency = audio_fifo;
+ else if (!m_has_audio && m_has_video && video_pts != DVD_NOPTS_VALUE)
+ latency = video_fifo;
+- if (!m_Pause && latency != DVD_NOPTS_VALUE)
++ if (!m_Pause && (m_omx_reader.IsEof() || latency != DVD_NOPTS_VALUE))
+ {
+ if (m_av_clock->OMXIsPaused())
+ {
+- if (latency > m_threshold)
++ if (m_omx_reader.IsEof() || latency > m_threshold)
+ {
+ CLog::Log(LOGDEBUG, "Resume %.2f,%.2f (%d,%d,%d,%d) EOF:%d PKT:%p\n", audio_fifo, video_fifo, audio_fifo_low, video_fifo_low, audio_fifo_high, video_fifo_high, m_omx_reader.IsEof(), m_omx_pkt);
+ m_av_clock->OMXResume();
+- m_latency = latency;
++ if (latency > 0)
++ m_latency = latency;
+ }
+ }
+ else
+ {
+- m_latency = m_latency*0.99f + latency*0.01f;
+ float speed = 1.0f;
+- if (m_latency < 0.5f*m_threshold)
+- speed = 0.990f;
+- else if (m_latency < 0.9f*m_threshold)
+- speed = 0.999f;
+- else if (m_latency > 2.0f*m_threshold)
+- speed = 1.010f;
+- else if (m_latency > 1.1f*m_threshold)
+- speed = 1.001f;
+-
++ if (latency != DVD_NOPTS_VALUE)
++ {
++ m_latency = m_latency*0.99f + latency*0.01f;
++ if (m_latency < 0.5f*m_threshold)
++ speed = 0.990f;
++ else if (m_latency < 0.9f*m_threshold)
++ speed = 0.999f;
++ else if (m_latency > 2.0f*m_threshold)
++ speed = 1.010f;
++ else if (m_latency > 1.1f*m_threshold)
++ speed = 1.001f;
++ }
+ m_av_clock->OMXSetSpeed(S(speed));
+ m_av_clock->OMXSetSpeed(S(speed), true, true);
+ CLog::Log(LOGDEBUG, "Live: %.2f (%.2f) S:%.3f T:%.2f\n", m_latency, latency, speed, m_threshold);