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 0538540529 for ; Tue, 21 Dec 2021 12:13:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 84E8668AF7A; Tue, 21 Dec 2021 14:13:29 +0200 (EET) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C2BD68AF6F for ; Tue, 21 Dec 2021 14:13:27 +0200 (EET) Received: by mail-lf1-f42.google.com with SMTP id bu9so7327578lfb.7 for ; Tue, 21 Dec 2021 04:13: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=jTebabOmlfgB8TgDf25Lj5HuT1G0bSzEeeDJ5IYPptdYNM7E/wILjn429Pysi+4cXM HXtUITRF5LPzecYVr8LNKLb7EMLwx7k2Wm9F88PoZC/XcPvrwM72LpjX92qS8v7/Cxj7 Qp4gY2yKytlx4XZXjBEQVga5wNpf5UJ6UP+61mzaqJZfmmG1Cfe5NcZG1q/FjIx+QbID WroaCrig2wyHIEosrpWAsMyPKrH0JjjhL/WsePV1vhHFUDs7T3fR+ZRCpGtrVeaMpxWC vhylrwJYZSSXTm3l/lnoifIFFP+etzhZfle7vd/XzaaRg0E7qmhyl0aTythBVZ3eMVqT 8ojw== 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=8EdIRD1y4R83otuW+z45feEDO4ABt2SGuuWVyzP+RNQQwT+ZCi+hWRhZvofL9fAKq/ BMsSZJfdvoUAM2t69Tsacd6kLQ9Tqd39NeyewC5/5avDuNJ1AK6x3ZP230WpphW3gzpz VK5hDTn3WZswYArgTAdh/GM1xQvbB/7lJXDfRSVYYHQZjz/u0rYJirdFqyxVUVpYcsVP ulFesL2U1xA4v+Bj0odLoBfv9EgGOB9OVeWuZJRt7aMsokGM2uQr55eq52ggtc0vQov7 +GvFqp1rJ+R1YP1LOMfCZ/3jbRl4YEe8DJQhoQK4/T57xJVzfoPneTFqeFPjbzrJcs/z tFdw== X-Gm-Message-State: AOAM530/Rpi5Zd2+cMrJ6F2WLtRjL5vn2w6i7SWAYH4qqBp1DmpWkZHh Dh/W+YbBjvkS+sb5tLJWIn+Lhjqzii+a+w== X-Google-Smtp-Source: ABdhPJw9Z0zw0vQ9S9Y4hrurSX3Az5IBZXTZyCy1LcwckDi6pBFale3a49uw5W2vu8jYwwYyqSxPmQ== X-Received: by 2002:a05:6512:2111:: with SMTP id q17mr2816037lfr.285.1640088806691; Tue, 21 Dec 2021 04:13:26 -0800 (PST) Received: from localhost.localdomain ([196.244.192.13]) by smtp.gmail.com with ESMTPSA id b43sm2618823ljr.64.2021.12.21.04.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 04:13:26 -0800 (PST) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 13:12:32 +0100 Message-Id: <20211221121239.1201-6-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20211221121239.1201-1-dcnieho@gmail.com> References: <20211221121239.1201-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v6 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 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".