From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 971B3401DC for ; Sun, 19 Dec 2021 19:23:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F2D968AF8F; Sun, 19 Dec 2021 21:22:33 +0200 (EET) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B558768AF55 for ; Sun, 19 Dec 2021 21:22:32 +0200 (EET) Received: by mail-lf1-f52.google.com with SMTP id b22so16914904lfb.9 for ; Sun, 19 Dec 2021 11:22:32 -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=AOeYmYrFAR3CDrLyijiWZ1iKBc4Bw+f/Ur6ajJRnW2Gqv8RGHi1owYjZO9fNWaICXt mS0PAHchqsAxqmq8JgYjQrfTTarDf3CQVjDR3Gj3ljbWCYtKEoJuy8IYwugw3JrfrEF2 lMFv6QVi+4cUwjb8pb4EOaugvro8gLfEIF8025MCF8Ts9/5DIzF7K2C3hyU67RxowUPF xDrmk+kl+RtrC3EHHE76Xju+U185kyOFcuVLfdXhKOYB1aD9pRkxeMssole79+1Ysy0E 5WK6E+TLMSWez8kTvApFG132GoYsgVZBikSesr5QXEfcn8P81O2/NGa4amxGHgTaiGVH 7erQ== 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=YvHTXo12JXMeTrqevcD+O4ARcUG7yAtVzxo7PWHsRLOl93cXY+VIHWL0YtTAa8fLLI We0gO0f8loZFNi8r8aCDs9kYDAk3YPbiiK/ucHOfZuOskoPFMQIhOCwu5gqxhYxDwhCX G9LNxjU/pcJxeaxoUDSPIiJcnLKTr586iz8VIQrGe6VPtrKB++3Tpdq5ef7UOQJ13hTm pF8sjOU7UN441WsH6+bR1pfQgs0zQi5I0O67+89VZ7X0UxIgVgc590MiN5IRg05UonJd jn7lMCPImhTEwDVmKW+FcZM8sdJeFxITKf13CrXOJ7G0JGZbFutpZE1zBgJK9EnmWG6U s+oQ== X-Gm-Message-State: AOAM533E5xNfloSHZKsRbCDck7f94pnt9NvmbMOT3nsDTaIUwYr3w3ro 5Er2vlZdKT/ZanLvkgJT78RYaCoMC2lUs5eT X-Google-Smtp-Source: ABdhPJyINBt8GPq9UODXJLr2gXpwPlhkAiEsYb7iKdBJTGneHSdnGjPYw3Rt1fhlyVsoLhTTN9lbDA== X-Received: by 2002:a05:6512:210f:: with SMTP id q15mr4607937lfr.112.1639941751788; Sun, 19 Dec 2021 11:22:31 -0800 (PST) Received: from localhost.localdomain (84-217-56-54.customers.ownit.se. [84.217.56.54]) by smtp.gmail.com with ESMTPSA id a17sm2326693ljq.72.2021.12.19.11.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Dec 2021 11:22:31 -0800 (PST) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Dec 2021 20:21:27 +0100 Message-Id: <20211219192134.1296-7-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20211219192134.1296-1-dcnieho@gmail.com> References: <20211219192134.1296-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 06/13] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Diederick Niehorster Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 --- libavdevice/dshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, }; -- 2.28.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".