aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Pfau <pfau@peak3d.de>2017-04-07 10:37:34 +0200
committerGitHub <noreply@github.com>2017-04-07 10:37:34 +0200
commit984fe69cd6de624f12d454fd5ad8f07080afdb12 (patch)
treea1d6ab9873aa47d29a6c4565a3d7885f31c14e59
parentd3fc85626de56f097c03fc431a2316e5a4bdd148 (diff)
parent40d3cd7c2e02dd8602925d0f9261437efb34486f (diff)
Merge pull request #11936 from peak3d/aspect
[MediaCodec] Fix videoBuffer video dimensions
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
index a38737f544..9897e754e6 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -1392,14 +1392,14 @@ void CDVDVideoCodecAndroidMediaCodec::ConfigureOutputFormat(CJNIMediaFormat* med
}
}
- if (width)
- m_videobuffer.iWidth = width;
- if (height)
- m_videobuffer.iHeight = height;
-
- // picture display width/height include the cropping.
- m_videobuffer.iDisplayWidth = crop_right + 1 - crop_left;
- m_videobuffer.iDisplayHeight = crop_bottom + 1 - crop_top;
+ if (crop_right)
+ width = crop_right + 1 - crop_left;
+ if (crop_bottom)
+ height = crop_bottom + 1 - crop_top;
+
+ m_videobuffer.iDisplayWidth = m_videobuffer.iWidth = width;
+ m_videobuffer.iDisplayHeight = m_videobuffer.iHeight = height;
+
if (m_hints.aspect > 1.0 && !m_hints.forced_aspect)
{
m_videobuffer.iDisplayWidth = ((int)lrint(m_videobuffer.iHeight * m_hints.aspect)) & ~3;