From patchwork Mon Jun 5 17:16:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 3841 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp1458546vsk; Mon, 5 Jun 2017 10:17:26 -0700 (PDT) X-Received: by 10.28.210.13 with SMTP id j13mr8336724wmg.110.1496683046369; Mon, 05 Jun 2017 10:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496683046; cv=none; d=google.com; s=arc-20160816; b=ETaPsbE5a1spk3RIh9TTWVYRkpgy1K5YNNZvGB0xlr9x+Oy7rEbfVM0EoWZMBOR3u5 uFAtHaJkl4aT22RdIueh07YmRCADcTlEHAnlDfYWnMhbiLu7Z06Iiy8ReIVrMCFaKRUP t3llxlzIov6enpL/6iuqhvDwqdPLFm+RGGhUI8eITb6/qwo+r5sLyVOOl5n0FIatdPSn kXT8q76gnQl4ZAgkR+qeGaMxr+godwsZm+ciWgW47/zdt1IIHKVWCQBaKKAgyD053gHS Q7cp+/2zEd+Q2s901VpzkqgKw4HqpbyCr5ulVl99veIRGxmsBaTREXtKS2jLix+VBDxh zflA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=b4sGToHpaFyy2owIC1qMBBwqlBUhg7IfQL036gd27wg=; b=TXPyIFRxY5OrQ7b5YfmNOtfCHBPXuKFT5FvAJwAhudIiPOJngwndanTnJb2H5Yvrc8 U/KKLLJ/Eg7xuw2/c9U8et1HN9a0E2t840uiEatXKIvNPMYNH4oCp/dTdxswMW6Cqr1J ZI9y4h5Z+UrYhMqLibqGv3z0kg3o0ewYKbCzUnVKuAzDjhXjRY3JNEPplPoWG24LKhDG OObFJnYeYyuWpM2C6EbZARbgVqgAU878O4R8Qaq7kprEb6eKY5sw0CljQJryWdHrEq9+ TFqaYwhXRJnnXhmIh8QdCISLNWImIJan5PXMEY3qkvpz8LUgkE1CvjpJ2k9cjdUQf8RK 3IuQ== 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 189si13000150wmz.140.2017.06.05.10.17.25; Mon, 05 Jun 2017 10:17:26 -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 4FBE6689BBB; Mon, 5 Jun 2017 20:17:16 +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 806CA6891EC for ; Mon, 5 Jun 2017 20:17:10 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id F15D6100B41; Mon, 5 Jun 2017 19:17:16 +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 TufbDy3+CheQ; Mon, 5 Jun 2017 19:17:15 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 7BA561031B7; Mon, 5 Jun 2017 19:17:15 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Mon, 5 Jun 2017 19:16:57 +0200 Message-Id: <20170605171657.11113-1-cus@passwd.hu> X-Mailer: git-send-email 2.12.3 In-Reply-To: References: Subject: [FFmpeg-devel] [PATCH] avformat/file: increase max packet size to 256k for written files X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Another huge performance improvement when using SMB/CIFS as output. Signed-off-by: Marton Balint --- libavformat/file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/file.c b/libavformat/file.c index 264542a36a..ae7231a484 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -227,6 +227,11 @@ static int file_open(URLContext *h, const char *filename, int flags) h->is_streamed = !fstat(fd, &st) && S_ISFIFO(st.st_mode); + /* Buffer writes more than the default 32k to improve throughput especially + * with networked file systems */ + if (!h->is_streamed && flags & AVIO_FLAG_WRITE) + h->max_packet_size = 262144; + return 0; }