Message ID | 20211221135337.1348-6-dcnieho@gmail.com |
---|---|
State | Accepted, archived |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5444597iog; Tue, 21 Dec 2021 05:55:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOQEOZy7ZWk67g9zT12cbwkRpBLgvRvrqMGNmmf91lITBmGtSWHgB/Vf2kj6yb7G4tmz+6 X-Received: by 2002:a17:906:a20e:: with SMTP id r14mr2732277ejy.376.1640094904630; Tue, 21 Dec 2021 05:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640094904; cv=none; d=google.com; s=arc-20160816; b=FcPLwFlnv0fmT63c9NJSDV/OHNn92PBWLJFGCLLleffKPjFvJohUgxKy51BPanUlyQ vX8IBdOPuDjpyyyVitqCzlA3CpP4DT77DbCawbbQEVh1ELsf51JPnbp7qS4J8O7y2aWv bv5XDK5bONKKprtQnaY+45BuPzaezI24ADnrvsXz1mC0+NkofUmf4vRYIiOEUBdeZyRn +TO6rVlivW/XONNWqf8pAvZ0A3xE6ihLIkEQOmDb49JutKZl9Eydcg5cDg67793JD57d GuK4NqIJFLfkQNq53IgfT0dT3S09ik10jCgoH4cB/sTy7EXW2w8GK7XOTCUhOor4NBOM CGjw== 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=3j0QrtQQHAeI1Zzn+f4NBkwbXDFahor9ccyTUmhV678=; b=PlBsWv/8bEoy7gyGsLYBZZ3i2bvzGsbHtwpPlXPna+iA0YFHWizJKYJODJnDif2z+y LDJI7lgDIGR8RGVIOzdeOUsUbOpBAGPRhCagxrJo397PTSDOfVzRrL+dG/4biOdDpGaf JNh7EJeXnw/BF/icTyTBBzU9PHZae30uSATrzQ0DfFImNJPYIcSIZmlAknbOcaUiduK1 aXcWldf41FS54d6mLI2XzB5hNU+ot73JCazwXrDH7WcXa5dmZDJmc8PlPsF1CmtnQy71 k8gIK0cPENKTjGX6W45zhqP5aAe4UjrcyYr5TMYzm2dFGKBuhT7iaEiKPy7iznTRxlQ8 mAVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=h9qM8q+y; 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 zh8si1866774ejb.902.2021.12.21.05.55.04; Tue, 21 Dec 2021 05:55:04 -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=20210112 header.b=h9qM8q+y; 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 83FD468AFD2; Tue, 21 Dec 2021 15:54:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD22168AA83 for <ffmpeg-devel@ffmpeg.org>; Tue, 21 Dec 2021 15:54:27 +0200 (EET) Received: by mail-lf1-f41.google.com with SMTP id bt1so29424621lfb.13 for <ffmpeg-devel@ffmpeg.org>; Tue, 21 Dec 2021 05:54:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PRQUajDDzo0yckQUc1NGOreX/fguC3LwegFuv42BzkQ=; b=h9qM8q+y1COkSGw8fkC5PXVQHHe+9VD3GWej7Puwsjzm3/W/qHX0QwjMNcbi7bemGC MghR9of0OXSvfX41M0jScqX+S8OM/KcLH7I2fIXzH1CBlofu+19RgkdWYmolCOGzQKXt ix1D3uccNtZuon5GZXW76vtfUw6Is5W9lGaMc4vR/ZFB2mPLUZc263URzRJ0iIEh7iXF F5SsayApG+uYRRejmm7O3iEhVY0K4no1rv4kDwD/KOxWlmoC6bRMJplWZFarQNFpbYqS KQvICJ0zcQ/6dPoTaNAg9cCu38/igklkLZWdYQfsMnxuCZwRF83v8HEGckrGrkkQiz5z zFyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PRQUajDDzo0yckQUc1NGOreX/fguC3LwegFuv42BzkQ=; b=3ZK+bqecpblEBlWT/zYh51s4+HKEhc9qq7wA1Cgq3+5P0ywEb8yzvLZHJhoDYe0cAU FkMZ/r7q7s7sTXcZoIll5mykifoFi1euwjqjyh1RI9xqIG97ci+56RR/6aJRh2f1ebaq ky/QPm83mJLH4E0OCbXMjFb4klEs75PDKgidyn4SMKlNXe1Q97Juv06Pge//Dmw1yqV6 Wu1eHhCtYftrfSQN4Z5DD1GC9dYlJVTap9Zo97vbtEmcJobEC4GXKZHG4jjo6jYRvmoH su8S/G0Rc1fn4x4Nlk3SO0ltMW503hrRmP5ojD6i60i9kzDEse5fHgHLLjk3FF0vJpg5 r+iA== X-Gm-Message-State: AOAM532StEo8ITUqHFBLEnySshjpt2IIXa5e4JqEbrqTVakG7Qm90ODg Lwxwxs85+2jB2YFjlEEhFmNQxgZ4J+MOcw== X-Received: by 2002:ac2:5547:: with SMTP id l7mr3103873lfk.324.1640094866752; Tue, 21 Dec 2021 05:54:26 -0800 (PST) Received: from localhost.localdomain ([196.244.192.13]) by smtp.gmail.com with ESMTPSA id k3sm2741285ljn.55.2021.12.21.05.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 05:54:26 -0800 (PST) From: Diederick Niehorster <dcnieho@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 14:53:30 +0100 Message-Id: <20211221135337.1348-6-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20211221135337.1348-1-dcnieho@gmail.com> References: <20211221135337.1348-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v7 05/12] 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: z/0eHGz1f13/ |
Series |
dshow enhancements
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 5e6eb9c85d..0ef3b3d13e 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1329,6 +1329,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(-)