Message ID | 20210611203104.1692-6-dcnieho@gmail.com |
---|---|
State | Superseded, archived |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp762938iol; Fri, 11 Jun 2021 13:33:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHq+QpxH4Ubu9OvbL5eecyMTaZ2piKpmPjGdCgyFgl0Jb9jVpZDE+djpgv+fWXvi29NnpZ X-Received: by 2002:a17:907:7713:: with SMTP id kw19mr5029513ejc.249.1623443588895; Fri, 11 Jun 2021 13:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623443588; cv=none; d=google.com; s=arc-20160816; b=C3N4BrOhJvQgKwms7DlKl+KZigtvZ7d0G++CIfyI+pbLcb2yluuqIZL54JdV5pfe3j kosRwdFLXvo2jO6BM1fsdXCrZu33LxsNEDCOVpQ+VrYdcLZqKEQ5jXIYRehs3Z3sAQyM QrvBwD/EDSqNmKv4fnR2dWa+aOxX9xl7UE5QmmQFmgR4R7e9Uu/ahb22H3TLxGDn0+3k NXsQ0NSC2YpS+8lBPbR+htj/wW8QFAchA3S0fclptaP6LWzeo3Sh/sg7hfXA8SfuEsb5 ZAKLni2D0qF2PQIB+UVQK3b5LNey9zvF/iQorqy6622GJIl++YFS1VD7lxWnH3PcoiQQ +leA== 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=sokqD8fQSNwKlswcn3buB/0JwLtVDks8mYMf2PcTuYE=; b=Ya4K44a/kGT4Zd53Vedb3O+r9wFd6rTAPV/SAwornKxerN7g0eWqAO5LUuyb7gUa/J HZQEb4ytQYXZMLqwAVgCsacQjmeZFSOfHytykXyDb6XXfAyTDkbcKsNe3DD/jA6pPgaJ E5bW7GpXN/8RiLVmeig6Ji8754p6r70yyKfN/KElmMzxeX4i1CXZBU3IsJFm9sFBJ5xH n2uukCbNZ3Vrb6uyqAhTB/xh5RcDdqqLrWmpsCe4pzFRdc07kjkTNWzSEZH9GJxdzxpw zTJi4ibTCNkcsP7zbiAGDesb4GszLiEI9mLRxtGMKKfPDKevvUaDoXTmD+gla/rTDLGm ml1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Y2sPfriD; 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 f27si5811287ejl.134.2021.06.11.13.33.08; Fri, 11 Jun 2021 13:33:08 -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=Y2sPfriD; 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 6E25868804B; Fri, 11 Jun 2021 23:33:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 084AD680BD5 for <ffmpeg-devel@ffmpeg.org>; Fri, 11 Jun 2021 23:33:03 +0300 (EEST) Received: by mail-lf1-f49.google.com with SMTP id x24so4732797lfr.10 for <ffmpeg-devel@ffmpeg.org>; Fri, 11 Jun 2021 13:33:03 -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=yJeuo0ydICb0kyFsuJvu0RLWdFppQ9yrf/CpLl4W04Y=; b=Y2sPfriD6Pson+1Pxlkl6dWG8XV7MFO7GSwSVSIL/fCZ1HN8zckHY6PUGCrtgJulJi qEHV8J/rx2Uef7R1GUjIaxoHrqIrqACD65prBew8MxR0nv10u1YdjfipTfOIsFiAnlUO qGV6ni+aGuWc7Jshf2TX/Rr3NUp/2PHzCUsIerG+7CzPstMcmPpTGbpnZBOtQa+2Z4P4 d+TFU2pQnDi+/Z37qtYn37x/DtGGNV5aPabBVObJZon8wxVpk/zeCDdr7Cit57EzTk2f rFVfRjCi/JZKuV0nD8EXtP9PGVnuVUQfUAK5A+P+FE2vwC0DJeyLUpvRQSBynprARIBV QcGQ== 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=yJeuo0ydICb0kyFsuJvu0RLWdFppQ9yrf/CpLl4W04Y=; b=L96+zZBSZPSDf2KZeQUitXHM3Isa466gKgHTDD0aILw/GrXDVIKvcZ/sLgtPgdnIN1 tnQxP14OEVsmP6ifuNh5m0DzP1VtJADN8MqPGbj/Hoxfgp2bXD6rU2e2j9iYADDIYu3f cnlYC6+Q9mOp9vynnRSaprpOhesagxYckMFsoeh5MqtriSl0RluguCxtRBPBgAWSrO/Z U+4NxUbleiKsMr/nr7+nrOeozjHMxQZI4iTFkY2UpDwUyv8YhHWqiTnAiGICWJnHTgu7 S3FeTC5cmA+B+0DmNT26/r9O2cFr+acjSspxJC5yWpOqbWipHdnPZI7KWTFNFEnVo8/m L7Vw== X-Gm-Message-State: AOAM530hDUqK9+ejbIRXKtlcyM8RTIaOoepfXzG9QOBvuH15ANVjQJYi HG+uupmOBMSTDvPTqqXGHX5pr7HYvSxFRQ== X-Received: by 2002:ac2:4a7a:: with SMTP id q26mr3643595lfp.395.1623443582751; Fri, 11 Jun 2021 13:33:02 -0700 (PDT) Received: from localhost.localdomain ([196.196.203.214]) by smtp.gmail.com with ESMTPSA id w17sm688629lfn.5.2021.06.11.13.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 13:33:02 -0700 (PDT) From: Diederick Niehorster <dcnieho@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Jun 2021 22:30:36 +0200 Message-Id: <20210611203104.1692-6-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210611203104.1692-1-dcnieho@gmail.com> References: <20210611203104.1692-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: jNIKGAVm0gL4 |
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(-)