From patchwork Wed Oct 12 13:22:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Bouron X-Patchwork-Id: 972 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp274950vsd; Wed, 12 Oct 2016 06:22:54 -0700 (PDT) X-Received: by 10.195.12.42 with SMTP id en10mr1454755wjd.126.1476278574581; Wed, 12 Oct 2016 06:22:54 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id rr15si10350534wjb.65.2016.10.12.06.22.53; Wed, 12 Oct 2016 06:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14289689B39; Wed, 12 Oct 2016 16:22:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A7E96897E5 for ; Wed, 12 Oct 2016 16:22:44 +0300 (EEST) Received: by mail-lf0-f67.google.com with SMTP id b75so7021363lfg.3 for ; Wed, 12 Oct 2016 06:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ps7lvptb/bIkvVq5Tkh4IuT4OitdsNhSmaMYoJr83dg=; b=lkkxiOdKK4DHm5oLeu+/eaKB6RccF75uOdfwDeV6XAUiWHku03wXA61tmn+R1B4+u2 e3sB10BSdpUBzryuA2xZj8vowWdAq2qsABM/2e3mxC0yPl8nNfV/qTHmwQlHVy8B+JFR ZcaM9Map9dHslxe0pdB9An1ZLyIm+JyNLtN1TN4VUZT3fyo0I4lFvp6l04pbDM+bhVZo W0+uhncn6zDpMkbWfWrByQwiptcJNPAJsl5YVLQXA/pQfrjlt+ckR8RldP4tXM+606MA 94mW/z6A/1IPNEZ4CvjUQg9X9T/ZA2NmngQvfYWAIVTNa2K/QyZzQgdA7M8ijTCrA+aL o+tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ps7lvptb/bIkvVq5Tkh4IuT4OitdsNhSmaMYoJr83dg=; b=eafSbklxgvkmT0O++lYgUg/9a4BUEvMXB+JLQP3/p3nVImEgq8tCOIfw1sif7A5urX rUKDxZk4YQvHDOqfzZBoEaXlMUsdIyUGCDEGyoZxNB4UYvKbhUwgwh/K889hlAsuoEIr OK7asJzCx0dB6Ixjeh2c147TFdNkd7k8EHB7ZRsefB+tgZ6Ope11v7C/RD1VBRf0rfsZ Ra69RElyT8oxZ8LZqJKABQBJRjTYPtuy/2JREPK7D7/mZirH3qSvEtUbvAbaVjkhb2qZ 2RWbS6biDa5/PKNb6sOjuzEgSnN/7tFORHwnr2D/iXuxtnec6dvC147OMLMbfuXOb3BF ECKw== X-Gm-Message-State: AA6/9Rl0aYiMZO6HOvale8ohiApJbA5RMrTuLgan5nk/6WTtsySfXnwA61MGTpMWb5mhAQ== X-Received: by 10.194.109.229 with SMTP id hv5mr1431482wjb.131.1476278563956; Wed, 12 Oct 2016 06:22:43 -0700 (PDT) Received: from boken.gopro.lcl (LPuteaux-656-1-74-135.w80-12.abo.wanadoo.fr. [80.12.80.135]) by smtp.gmail.com with ESMTPSA id bl3sm12883726wjc.26.2016.10.12.06.22.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2016 06:22:43 -0700 (PDT) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Oct 2016 15:22:39 +0200 Message-Id: <20161012132242.4440-1-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.10.0 Subject: [FFmpeg-devel] [PATCH 1/4] lavc/mediacodec_wrapper: do not discard codecs reporting they do not support any profile X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Matthieu Bouron MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Matthieu Bouron Depending on the device, some (VP8/VP9/...) decoders report that they do not support any profiles. --- libavcodec/mediacodec_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 97e3a29..c2af950 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -480,6 +480,9 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e } profile_count = (*env)->GetArrayLength(env, profile_levels); + if (!profile_count) { + found_codec = 1; + } for (k = 0; k < profile_count; k++) { int supported_profile = 0;