[FFmpeg-devel] [PATCH 3/3] avformat/aviobuf: increase buffer size to 128k

Marton Balint cus at passwd.hu
Sun Jun 4 16:35:07 EEST 2017


Another huge performance improvement when using SMB/CIFS as output.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/aviobuf.c     | 2 +-
 tests/ref/seek/lavf-alaw  | 3 +--
 tests/ref/seek/lavf-mulaw | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 7d1b385253..36eb093a3a 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -33,7 +33,7 @@
 #include "url.h"
 #include <stdarg.h>
 
-#define IO_BUFFER_SIZE 32768
+#define IO_BUFFER_SIZE 131072
 
 /**
  * Do seeks within this distance ahead of the current buffer by skipping
diff --git a/tests/ref/seek/lavf-alaw b/tests/ref/seek/lavf-alaw
index 4b1f8fbc02..d8e99b6957 100644
--- a/tests/ref/seek/lavf-alaw
+++ b/tests/ref/seek/lavf-alaw
@@ -15,8 +15,7 @@ ret: 0         st: 0 flags:0  ts: 0.364989
 ret: 0         st: 0 flags:1 dts: 0.364989 pts: 0.364989 pos:   8048 size:  1024
 ret: 0         st: 0 flags:1  ts:-0.740816
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:  1024
-ret: 0         st:-1 flags:0  ts: 2.153336
-ret:-EOF
+ret:-1         st:-1 flags:0  ts: 2.153336
 ret: 0         st:-1 flags:1  ts: 1.047503
 ret: 0         st: 0 flags:1 dts: 1.047483 pts: 1.047483 pos:  23097 size:  1024
 ret: 0         st: 0 flags:0  ts:-0.058322
diff --git a/tests/ref/seek/lavf-mulaw b/tests/ref/seek/lavf-mulaw
index 4b1f8fbc02..d8e99b6957 100644
--- a/tests/ref/seek/lavf-mulaw
+++ b/tests/ref/seek/lavf-mulaw
@@ -15,8 +15,7 @@ ret: 0         st: 0 flags:0  ts: 0.364989
 ret: 0         st: 0 flags:1 dts: 0.364989 pts: 0.364989 pos:   8048 size:  1024
 ret: 0         st: 0 flags:1  ts:-0.740816
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:  1024
-ret: 0         st:-1 flags:0  ts: 2.153336
-ret:-EOF
+ret:-1         st:-1 flags:0  ts: 2.153336
 ret: 0         st:-1 flags:1  ts: 1.047503
 ret: 0         st: 0 flags:1 dts: 1.047483 pts: 1.047483 pos:  23097 size:  1024
 ret: 0         st: 0 flags:0  ts:-0.058322
-- 
2.12.0



More information about the ffmpeg-devel mailing list