[vlc-commits] mediacodec: fix HEVC aspect ratio on Amazon devices

Thomas Guillem git at videolan.org
Wed Jan 15 14:53:33 CET 2020


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 15 14:40:15 2020 +0100| [82f08cf0a25fa9b1b2cfa44ff60e59c7eabd6a31] | committer: Thomas Guillem

mediacodec: fix HEVC aspect ratio on Amazon devices

When I tested it, cf. 71fd3326ea4390d4e62434670baf69388f51ab04, I'm pretty sure
that this hack was not needed for HEVC. It seems to be needed now, so let's
enable for every codecs.

(cherry picked from commit 9becdf811bd977a1174aaf1d11887bab4cf4dbd9)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=82f08cf0a25fa9b1b2cfa44ff60e59c7eabd6a31
---

 modules/codec/omxil/mediacodec_jni.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/codec/omxil/mediacodec_jni.c b/modules/codec/omxil/mediacodec_jni.c
index 1dc206515e..db8c14d0b1 100644
--- a/modules/codec/omxil/mediacodec_jni.c
+++ b/modules/codec/omxil/mediacodec_jni.c
@@ -486,15 +486,15 @@ char* MediaCodec_GetName(vlc_object_t *p_obj, const char *psz_mime,
 
                 bool ignore_size = false;
 
-                /* The AVC MediaCodec implementation on Amazon fire TV seems to
-                 * report the Output surface size instead of the AVC size. This
-                 * bug is specific to Amazon devices since other MTK
+                /* The AVC/HEVC MediaCodec implementation on Amazon fire TV
+                 * seems to report the Output surface size instead of the Video
+                 * size. This bug is specific to Amazon devices since other MTK
                  * implementations report the correct size. The manufacturer is
-                 * checked only if the codec matches the MKT AVC one in order
-                 * to avoid extra manufacturer check for other every devices.
+                 * checked only if the codec matches the MKT one in order to
+                 * avoid extra manufacturer check for other every devices.
                  * */
-                static const char mtk_avc[] = "OMX.MTK.VIDEO.DECODER.AVC";
-                if (strncmp(psz_name, mtk_avc, sizeof(mtk_avc) - 1) == 0)
+                static const char mtk_dec[] = "OMX.MTK.VIDEO.DECODER.";
+                if (strncmp(psz_name, mtk_dec, sizeof(mtk_dec) - 1) == 0)
                 {
                     char *manufacturer = GetManufacturer(env);
                     if (manufacturer && strcmp(manufacturer, "Amazon") == 0)



More information about the vlc-commits mailing list