mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/file: increase min/max packet size to 256k for written files
Buffering more than one packet can be a huge performance improvement for encoding files with small packets (e.g. wav) over SMB/CIFS. Acked-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
eeeb595c7f
commit
db9e87dd8c
@ -229,6 +229,11 @@ static int file_open(URLContext *h, const char *filename, int flags)
|
|||||||
|
|
||||||
h->is_streamed = !fstat(fd, &st) && S_ISFIFO(st.st_mode);
|
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->min_packet_size = h->max_packet_size = 262144;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user