Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Gramner <gramner@twoorioles.com>2022-09-08 20:56:05 +0300
committerHenrik Gramner <gramner@twoorioles.com>2022-09-09 17:40:17 +0300
commit5247319775ce71e2494fea97b7d30403e0244db3 (patch)
tree9fcf2fd206daae00d0bea02b62a7fad3485843b0
parent934713e4a65bcdb1e89884a6160fd62db081bf53 (diff)
tools: Improve demuxer probing
Increase the probing size, and change the logic to assume a stream is valid even if no conclusive decision could be made within the probing window as long as a sequence header was detected.
-rw-r--r--tools/input/annexb.c6
-rw-r--r--tools/input/section5.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/input/annexb.c b/tools/input/annexb.c
index 7c7d4e3..8add61c 100644
--- a/tools/input/annexb.c
+++ b/tools/input/annexb.c
@@ -43,7 +43,7 @@
// these functions are based on an implementation from FFmpeg, and relicensed
// with author's permission
-#define PROBE_SIZE 1024
+#define PROBE_SIZE 2048
static int annexb_probe(const uint8_t *data) {
int ret, cnt = 0;
@@ -113,10 +113,10 @@ static int annexb_probe(const uint8_t *data) {
temporal_unit_size -= obu_unit_size;
frame_unit_size -= obu_unit_size;
if (frame_unit_size <= 0)
- break;
+ return 0;
}
- return 0;
+ return seq;
}
typedef struct DemuxerPriv {
diff --git a/tools/input/section5.c b/tools/input/section5.c
index b7cc203..db1b34c 100644
--- a/tools/input/section5.c
+++ b/tools/input/section5.c
@@ -39,7 +39,7 @@
#include "input/demuxer.h"
#include "input/parse.h"
-#define PROBE_SIZE 1024
+#define PROBE_SIZE 2048
static int section5_probe(const uint8_t *data) {
int ret, cnt = 0;
@@ -77,7 +77,7 @@ static int section5_probe(const uint8_t *data) {
}
}
- return 0;
+ return seq;
}
typedef struct DemuxerPriv {