Message ID | 20210608104849.829-1-dcnieho@gmail.com |
---|---|
State | Superseded, archived |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp4280144iof; Tue, 8 Jun 2021 03:49:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUFZrXE1ZcLgKOv45eUYhXUYLRAxvZ5tFCHwjOXQMY5wmLjtzDI+/ptYVVSRm7FBh54tct X-Received: by 2002:a05:6402:26c2:: with SMTP id x2mr16108650edd.124.1623149358966; Tue, 08 Jun 2021 03:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623149358; cv=none; d=google.com; s=arc-20160816; b=Cj4BZhbrUrlWVYoCzl+W3v+s9xchwsCEUx4soTJlwJz+ghxKoZctDJTuylE7qkukxX y2QbGUsSUiMUDlStiyyhG5wqAqC6QuFJ2VJ16f2DL6MujRi36ToNqAhb93EpCtqE0z79 0Oi7J8g4Gu6NESu/WbiNa2gWR30Rdiq+WTh+uQy9rYWRfaSD9LBTxNpGnKqklhczKwRG 4qadDs31oQNoifnO11eLxuBhAp7lKTVOrIpkQZBYWRfnQGiLsu2KSLWnDN/wI/dPpT3F 34iAdVuo1ePWuykoYTCFfOdENo0IFrfUaaNchg/G8kGf9WbxhA0GLM7sdlC2R1iqy2jZ 13MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=+ORDt7QsIkHrduN6ffwTvhvZmVN4JSMFgki1d0WqEAU=; b=JkFRAdGtKZa9f1W81jpyIoLXQW0uA1TQFz+qimDxnEt45aE5BlDiBBUTlclCME0qV+ G1jLtVs1EvnEzL8OtF3qtGeCDQ0Te/+xXl97fJei+QLYikc1OucLySIl+EYT6gclsDM9 WF9aArx08CCIfMWWJXGYcdHuXWvvf99y3rN9t0wE4yWRt6vrL6cXACOUZKTs/F1wJ9Bh nGPnIh7Ld7UFKfrj2Cm5IdpOmdT0oKus6WmT93uOG8NqLIP6ozOwTO0xPHaj7yOZvfkI cnJdX+UKPb6JeG7JYeabEqch9damwg6uxftV4Xq63GQGuRYKTiEp3dFqwktH+ZAQd8Ra XzrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=B2GugXbi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e8si15299042edy.573.2021.06.08.03.49.17; Tue, 08 Jun 2021 03:49:18 -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 header.s=20161025 header.b=B2GugXbi; 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=QUARANTINE 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 C8FD7680910; Tue, 8 Jun 2021 13:49:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD5A16802FF for <ffmpeg-devel@ffmpeg.org>; Tue, 8 Jun 2021 13:49:08 +0300 (EEST) Received: by mail-lj1-f179.google.com with SMTP id r16so7215248ljk.9 for <ffmpeg-devel@ffmpeg.org>; Tue, 08 Jun 2021 03:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IdfTEkOwKy3kOStZMzn++FqcVYTGE2dLKFflvDdgHdY=; b=B2GugXbiPHxIrlMWKevDRW7n65TdO/HnkyekVsvDqzBN2XEwpb2krCQG4fZBEihs+T rgfsTy0thG1t4EmZeqg6UjxJWvKmKnGE2uyG7pCROGvd4p1hV3PWFo3oJTW+pzHxKS8i Y6hZ6KCJA/y5Is/k3QB+RG/48wpo7bbkXJKUBKLk/iS0AA72kTLdHcJQmFpvH+zahLbE 90yf4uFzVk2bKH+4r4r0k1ALJGJ1XTknwOab+mxSvdQIHQqvq/wwNLyfDkm9BtOCSOy6 HbINa6h1J522FzIUdhFmS0CWNTgRMUPs4fXJ3kQRGBKEH9igARMEs7PMPi9RKTLDlMaE cMVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IdfTEkOwKy3kOStZMzn++FqcVYTGE2dLKFflvDdgHdY=; b=a6/KP/+ap8UdLf3y7XkdaBuBAy7SjcILi1H7MU/DsGcw41vzsplErbCuMFXDaOJtfg jiLAYJR8qD83XuRV59kATNYWzcwH7zEvDD3PzxIfSPV1i4QuGEzUcNjGja+FQrmSOZeD ENUbNRdqxhEzzNOz5i5v6LPIL8Aells3Qxm0UwuxV0Orh4ZcYAXITuDcU4DLgN8pQKKx GHBNpQmqx6I+3NCne3eU7qlw1VeXZkuQDbULstzm739TRBulXaVrZZE9h8fcAwcUt+m7 p3X0pyMsnjug2JR3ZzwYNaC9FDwtcBMPX0eBzjXJ2yUw63STFcbgR60Mvip/r8iphyJJ YSTA== X-Gm-Message-State: AOAM533CEoPPa9OkV2Gvm16HdDDVeyqu5z2VauZvcMfXq27Wc9++Z8Ep ON74QIEepsjF/5ba74qaLwLX/rzsUws= X-Received: by 2002:a2e:3c0c:: with SMTP id j12mr13448233lja.131.1623149347958; Tue, 08 Jun 2021 03:49:07 -0700 (PDT) Received: from localhost.localdomain (eduroam-employee-08.wireless.lu.se. [130.235.240.8]) by smtp.gmail.com with ESMTPSA id m9sm2223964ljh.6.2021.06.08.03.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 03:49:07 -0700 (PDT) From: Diederick Niehorster <dcnieho@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Jun 2021 12:48:49 +0200 Message-Id: <20210608104849.829-1-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210607230414.612-1-dcnieho@gmail.com> References: <20210607230414.612-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/33] avdevice/dshow: set no-seek flags X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Diederick Niehorster <dcnieho@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: zQlHJuFVVBup |
Series |
avdevice (mostly dshow) enhancements
|
expand
|
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 2e9f9ddf3f..389daa6380 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1336,6 +1336,6 @@ const AVInputFormat ff_dshow_demuxer = { .read_header = dshow_read_header, .read_packet = dshow_read_packet, .read_close = dshow_read_close, - .flags = AVFMT_NOFILE, + .flags = AVFMT_NOFILE | AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK, .priv_class = &dshow_class, };
avdevice/dshow is a realtime device and as such does not support seeking. Therefore, its demuxer format should define the AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH and AVFMT_NO_BYTE_SEEK flags. With these flags set, attempting to seek (with e.g. avformat_seek_file()) correctly yields -1 (operation not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> --- libavdevice/dshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)