From patchwork Mon Jun 27 20:02:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 36489 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b27:b0:88:1bbf:7fd2 with SMTP id l39csp2225933pzh; Mon, 27 Jun 2022 13:03:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sZZMRCiVtaN4p2qsBP0qFAyq8pE9gqMEOeJH2bVIcF5gnbCJS1AqyfbzlozSeMrMm9jcc6 X-Received: by 2002:a05:6402:498:b0:435:daf0:915b with SMTP id k24-20020a056402049800b00435daf0915bmr18426107edv.322.1656360204436; Mon, 27 Jun 2022 13:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656360204; cv=none; d=google.com; s=arc-20160816; b=l2NvhHxdJ7yaDrv+XBrxOphNTbO5AHCVpSCeAVSzhGRvR9sK8V0NjfxclzKbFS6iev h2XDqOz3zPkQD6lkWVPHb15lmXeSOfQnfjh3naAVdLkRDxn3ZjAqGgL6FQlMC1Q4VQiZ xb2M4rjk00BRTqPIPh6Hjzc8S5xBxu8VMlyzo2XE3KCkNxNl66JuMX961YlYS7Lpe/GH APVJ3jEG9NN4dYk/DCS+Pam9Zc24jJ6bK9+7rZ6ebtHY+/CZVTfDZ5v+5nDmCTmohQqA RMouk2fx8U2PFvmBe/4ObHSK8fhtJV3KaN2oG3v6WcqBKo29eBSSNR9EB3jIXmU2vMMm MYZQ== 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:message-id:date:to:from :delivered-to; bh=lvvFaj0RsvTWeNmG/nBtf65YC2CkHavOVjYWP3JUeqg=; b=OFqGuOr7T8/iMu2NRBlASOPNbQn8NZMrWbS6rV8jDa4TrVYVFGuJKVOe/ht+T8zMvx RJZT1WngW9u4wa0g1n3wqURMhTHQQSM7Jhd2bSZ4AFyl884u/PABcJAsBaDGUyrl6rbw Vijacy5GPJqM/OPbC6rqWe1wWXP+CMOharj0GaO7w7lNKsLnDW3ncCdsoYUOfSMuHpvE Nch8uTX1xzF/LCEkr0kX0GAhi8VFNS5v/VV++O2gSboyvXNzm1a9fv6Fgk2/bf33s76n 3a2Ksu1s3AR6bvsWd5++btWwI3TOqEVALeXe4mNnkbQB0IA1EXhCum46oWWnjXhtf2hN v7iQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f1-20020a170906084100b00722f70201d6si10538516ejd.612.2022.06.27.13.03.23; Mon, 27 Jun 2022 13:03:24 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0769E68B8D9; Mon, 27 Jun 2022 23:03:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C717768B682 for ; Mon, 27 Jun 2022 23:03:13 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 03DA8E74EF; Mon, 27 Jun 2022 22:03:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pLKsVUOfNaFm; Mon, 27 Jun 2022 22:02:46 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 91619E5349; Mon, 27 Jun 2022 22:02:45 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 Jun 2022 22:02:39 +0200 Message-Id: <20220627200241.7102-1-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] Revert "avformat/demux: Count EAGAIN as 100 bytes in relation to read limit in avformat_find_stream_info()" 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: KIxiG5lbv6ML Modifying avformat_find_stream_info() behaviour based on the number of EAGAINs it encounters is a hack which usually only hides the real issue if such thing happen. This reverts commit b0cac7082d8a3ff2d4f039af01b45c48bb578de7. --- libavformat/demux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index e121253dfd..57720f4311 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -2615,10 +2615,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) /* NOTE: A new stream can be added there if no header in file * (AVFMTCTX_NOHEADER). */ ret = read_frame_internal(ic, pkt1); - if (ret == AVERROR(EAGAIN)) { - read_size += 100; + if (ret == AVERROR(EAGAIN)) continue; - } if (ret < 0) { /* EOF or error*/