1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB

The previous threshold, 4 KB, maybe was reasonable when it was set
(in 2010), but in today's settings and with typical network speeds
and data sizes, it's pretty small. 32 KB probably is a more reasonable
default now, regardless of input.

This changes the test references for two seek tests.

When using the normal seek function, which boils down to the lseek(2)
function, a seek to an out of bounds position doesn't return an error,
but that condition is only reported when doing the subsequent read
(which returns EOF). When doing more seeks by fast forwarding, the
fact that the seeked to destination is out of bounds is noticed and
reported sooner in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2020-10-30 12:59:03 +02:00
parent 454bee5be0
commit 3fcfde2cea
3 changed files with 11 additions and 17 deletions

View File

@ -40,7 +40,7 @@
* data instead of calling the protocol seek function, for seekable
* protocols.
*/
#define SHORT_SEEK_THRESHOLD 4096
#define SHORT_SEEK_THRESHOLD 32768
static void *ff_avio_child_next(void *obj, void *prev)
{

View File

@ -7,22 +7,20 @@ ret: 0 st: 0 flags:0 ts: 0.788345
ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 17383 size: 882
ret: 0 st: 0 flags:1 ts:-0.317506
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret:-1 st:-1 flags:0 ts: 2.576668
ret: 0 st:-1 flags:1 ts: 1.470835
ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 32432 size: 882
ret: 0 st: 0 flags:0 ts: 0.364989
ret: 0 st: 0 flags:1 dts: 0.364989 pts: 0.364989 pos: 8048 size: 882
ret: 0 st: 0 flags:1 ts:-0.740816
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
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: 882
ret: 0 st: 0 flags:0 ts:-0.058322
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 43218 size: 882
ret: 0 st:-1 flags:0 ts: 1.730004
ret: 0 st: 0 flags:1 dts: 1.730023 pts: 1.730023 pos: 38147 size: 882
ret: 0 st:-1 flags:1 ts: 0.624171
@ -30,7 +28,7 @@ ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 13763 size: 882
ret: 0 st: 0 flags:0 ts:-0.481678
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:1 ts: 2.412517
ret:-EOF
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 43218 size: 882
ret: 0 st:-1 flags:0 ts: 1.306672
ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 28812 size: 882
ret: 0 st:-1 flags:1 ts: 0.200839
@ -43,8 +41,7 @@ ret: 0 st:-1 flags:0 ts: 0.883340
ret: 0 st: 0 flags:1 dts: 0.883356 pts: 0.883356 pos: 19478 size: 882
ret: 0 st:-1 flags:1 ts:-0.222493
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:0 ts: 2.671655
ret:-EOF
ret:-1 st: 0 flags:0 ts: 2.671655
ret: 0 st: 0 flags:1 ts: 1.565850
ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 34527 size: 882
ret: 0 st:-1 flags:0 ts: 0.460008

View File

@ -7,22 +7,20 @@ ret: 0 st: 0 flags:0 ts: 0.788345
ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 17383 size: 882
ret: 0 st: 0 flags:1 ts:-0.317506
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret:-1 st:-1 flags:0 ts: 2.576668
ret: 0 st:-1 flags:1 ts: 1.470835
ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 32432 size: 882
ret: 0 st: 0 flags:0 ts: 0.364989
ret: 0 st: 0 flags:1 dts: 0.364989 pts: 0.364989 pos: 8048 size: 882
ret: 0 st: 0 flags:1 ts:-0.740816
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
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: 882
ret: 0 st: 0 flags:0 ts:-0.058322
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 43218 size: 882
ret: 0 st:-1 flags:0 ts: 1.730004
ret: 0 st: 0 flags:1 dts: 1.730023 pts: 1.730023 pos: 38147 size: 882
ret: 0 st:-1 flags:1 ts: 0.624171
@ -30,7 +28,7 @@ ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 13763 size: 882
ret: 0 st: 0 flags:0 ts:-0.481678
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:1 ts: 2.412517
ret:-EOF
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 43218 size: 882
ret: 0 st:-1 flags:0 ts: 1.306672
ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 28812 size: 882
ret: 0 st:-1 flags:1 ts: 0.200839
@ -43,8 +41,7 @@ ret: 0 st:-1 flags:0 ts: 0.883340
ret: 0 st: 0 flags:1 dts: 0.883356 pts: 0.883356 pos: 19478 size: 882
ret: 0 st:-1 flags:1 ts:-0.222493
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 882
ret: 0 st: 0 flags:0 ts: 2.671655
ret:-EOF
ret:-1 st: 0 flags:0 ts: 2.671655
ret: 0 st: 0 flags:1 ts: 1.565850
ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 34527 size: 882
ret: 0 st:-1 flags:0 ts: 0.460008