summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaoqing MA <[email protected]>2018-07-27 17:26:12 +0800
committerXiaoqing MA <[email protected]>2018-07-27 17:26:12 +0800
commit98969284af66881b2a526482ee9e270e6e1a0f18 (patch)
tree4dffb9084105787e8356af4dc6dcb32654269561
parent98fb51badc4e73a657479600b531d5df037629e5 (diff)
1.去掉mp4判别中偏移+8部分的内容(当tag size超多整体size时会+1至下一个字符开始新的判别,所以偏移+8还会被用于判别,所以不需要特意考虑)
-rw-r--r--src/av_format_identify.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/av_format_identify.c b/src/av_format_identify.c
index 4458b97..ef6f0c1 100644
--- a/src/av_format_identify.c
+++ b/src/av_format_identify.c
@@ -342,7 +342,7 @@ int is_mp4_each(const char* buff, size_t size)
int ret = 0;
int fit_times = 0;
const char *p = buff;
- const char *q = NULL;
+ //const char *q = NULL;
const mp4_box *box=NULL;
uint64_t offset = 0;
@@ -351,7 +351,7 @@ int is_mp4_each(const char* buff, size_t size)
box = (const mp4_box *)p;//?
if(!is_mp4_boxname(box->name))//?,sizeof(box->name))
{
- if (offset <= 0xffffffff)
+ /*if (offset <= 0xffffffff)
{
p = q + 8;
box = (const mp4_box *)p;
@@ -359,8 +359,8 @@ int is_mp4_each(const char* buff, size_t size)
if (!is_mp4_boxname(box->name))
{
break;
- }
- //break;
+ }*/
+ break;
}
fit_times++;
if (fit_times >= FIT_TIMES)
@@ -385,7 +385,7 @@ int is_mp4_each(const char* buff, size_t size)
{
offset = htonl(box->atom_size);//p+=htonl(box->atom_size);
}
- q = p;
+ //q = p;
p += offset;
}