From patchwork Wed Nov 15 02:49:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Puttkammer X-Patchwork-Id: 6075 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp4059621jah; Tue, 14 Nov 2017 18:50:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMabPHqP3O1izyM8g0+uYQ3QnciDRtiIx23XfQ6eVG7Vwt3AhSyjS1B6YMALkkRsUHZEThnl X-Received: by 10.223.176.115 with SMTP id g48mr13127350wra.177.1510714201897; Tue, 14 Nov 2017 18:50:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510714201; cv=none; d=google.com; s=arc-20160816; b=QZqt48Ks89AAOpdLrs6sZFX1McDoML/HGcNIh9rTbseCssW5pFu8XniY67jW+990Oh fegIZKz8WQFsd5hxS/RAja5TIPIlgoUk0X51FZomI7yG1njwIt6MJR46L8Im5wxhlVwY DKSxFnomEgtVvApY2cv3/BpDLh8kHcaUQERJDlR9S97qkC1l1kbz0uMN/YwJZOe11Prp hVIAbLHxiwUjnwbxzgOQIdtU6pHLLFkTjsxfKWLpPhRP64sTnm31uXTcOR0vLFETpIDG +hXuBT3QMtsfh/u5fqrCp1vcXuntiFrMtN/vTuyC2WRWsXbWWClpKPvDgNUIxVMpqOAO 54xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:to:message-id:date:from:mime-version :dkim-signature:delivered-to:arc-authentication-results; bh=u+AqHdQgjWlVl9ZNoo7Ngq8ESG9cI2vAac9Zk0vIT9c=; b=xdfm5OM3L2xqA0sPpEOx2zZua8+v2mkWUbtDtg56DIEsnuwGOXsUKbazhupQdTXk7i qiS9/u09rMJc0ISg0xMq1EBYIc0+e486LBVOrnyTv2gPcX8dgUpTkXyCI46+sUSGWvM4 pYuXV6tMcP/v66EFA5CRqb0Q28x9++MD2oLtBSD8Sg/f/GLS2/6fbzGaRzx2Zr0Oshb0 jxrQJbMKp6uYer9A7I0hx3HoXtKTESoFPu9NRJJPToAMt8iBq/Aso3qr7bCg9Z4qkQuY czjCScWKy/AXnmbP+mQZsTzhVjapCqy3Ni5+7+kaGlU5pUciuD+4QhdIEptChLCfP/xt ajMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=iv63lyUA; 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 sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p199si8326825wmb.180.2017.11.14.18.50.00; Tue, 14 Nov 2017 18:50:01 -0800 (PST) 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 header.s=20161025 header.b=iv63lyUA; 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 sp=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 62A9E689E31; Wed, 15 Nov 2017 04:49:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FDCC689D43 for ; Wed, 15 Nov 2017 04:49:37 +0200 (EET) Received: by mail-it0-f54.google.com with SMTP id b5so105112itc.3 for ; Tue, 14 Nov 2017 18:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Xo9Jeto4bFEam2rVmyL6tuB//NUJSi4GEWA+n6jcG/k=; b=iv63lyUAGagoDqvEj3iivEb9OF6c5HP1hZvG0B2HMoXtsrpXobvRtOet0e1KWv/sKP U4K5scXc3Kd1QOpOpaJFxKXVNph6kwfVQZRVzK4MCNAqI8BZXmj6b9b538DDPoqHZ6Hx SSHgPg7oX0/rD5xe7L3Sbqv3ECC5KPHoLjFY6e1reiI1xAr5eKVg+pQGLDlJFeNnnHPF 9N5NIzAh/BzMXDuw9ve2a4n1o+CrvLWFm8KgSGxKJj0E6d8/S3UgUZsEc9CLGalbzxEF oyuPCuVVXCy/0NOleWWyEGhDcJIiW1t9aVIoCvSqyVb0CJJFVT3RcDPtFGmHFOWq0Nud 3w0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Xo9Jeto4bFEam2rVmyL6tuB//NUJSi4GEWA+n6jcG/k=; b=kTekkBAEfvvuwDiEPfwknPs+c2xUs4/1qSB73vYIXz3P3OB8oYcZmKqC44m0F1xxgx IQBk+lfcpdxbmuXhZtYec5Mvuc0ater6Xz85P/ESA1g4XdFTUMshMYKE00nDAsESviBq wJYw3F2UAnr37O/bruErC0wHjmwHmeF+B/MRSWRG9zBgCZpabC5YP1Q/qNsomBFSd6ig 4smutOXvSaUz1n8CwdY7ee5NfeokQ6quXgToc24nX7puWXPD8lbaG5tcuob9Zijo2rdl uKslxHXmcVM1Jhsr65+ED3sD7ICk7F02UapsTu0v3/5aQ+COJ0fCT+xsbmrYRkHaNcCV r5OA== X-Gm-Message-State: AJaThX59QPGgKXtGGD/4RLmLVGpOM0mwTm1QDgDOS6DQW8AsfFxwG6pH T9DGGQlUsh/Ipfha5FKN8oLmh3Q9L6XHMCxacUQ= X-Received: by 10.36.236.5 with SMTP id g5mr1455235ith.73.1510714191180; Tue, 14 Nov 2017 18:49:51 -0800 (PST) MIME-Version: 1.0 From: Roman Puttkammer Date: Wed, 15 Nov 2017 02:49:40 +0000 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] avfoundation, unsupported framerate/activeVideoMinFrameDuration 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi, Attached patch fixes an issue with avfoundation; the code continues to loop through the list of supported formats/framerates even after finding the chosen one, ending up with a bad format/rate combination. (Code breaks out of one loop only instead of two.) rgds, Roman ----- if (!selected_format) { diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index e2ddf47dbe..463ae60b63 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -312,6 +312,7 @@ static int configure_video_device(AVFormatContext *s, AVCaptureDevice *video_dev } } } + if (selected_range) break; }