From aec0d6719e3f27e2a5e72bc3fd2467ff382402e5 Mon Sep 17 00:00:00 2001 From: Xiaoqing MA Date: Wed, 25 Jul 2018 09:33:44 +0800 Subject: 1.按照mp4修改思路修改ts与flv-待继续修改 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/av_format_identify.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/av_format_identify.c b/src/av_format_identify.c index 09d93a4..90c231a 100644 --- a/src/av_format_identify.c +++ b/src/av_format_identify.c @@ -316,6 +316,7 @@ struct mp4_box_t }; }; #define MIN_MP4_BOX_SIZE (sizeof(struct mp4_box_t)-8) +#define htonll(buff) ((htonl(*(uint32_t *)buff)<<32)+htonl(*(size_t *)(buff+4))) int is_mp4_each(const char* buff, size_t size) { int ret = 0; @@ -336,7 +337,7 @@ int is_mp4_each(const char* buff, size_t size) { if(size-(p-buff)>sizeof(struct mp4_box_t)) { - p+=htonll(box->large_size);//TODO: Implement htonll + p += htonll(&box->large_size);//p+=htonll(box->large_size);//TODO: Implement htonll } else { -- cgit v1.2.3