From f04cbbd99c306e4a536a8b0251ed25f6b6a39a08 Mon Sep 17 00:00:00 2001 From: cfsmp3 Date: Mon, 4 May 2015 13:39:06 +0200 Subject: [PATCH] Experiments with 708 in MP4. --- docs/CHANGES.TXT | 5 ++++- mac/build.command | 3 ++- src/gpacmp4/gpac/isomedia.h | 3 ++- src/gpacmp4/mp4.c | 7 +++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 79e12428..13277796 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -5,7 +5,10 @@ - Fixed bug in capitalization code ('I' was not being capitalized). - GUI should now run in Windows 8 (using the include .Net runtime, since 3.5 cannot be installed in Windows 8 apparently). - +- Fixed Mac build script, binary is now compiled with support for + files over 2 GB. +- Fixed bug in PMT code, damaged PMT sections could make CCExtractor + crash. 0.76 (2015-03-28) ----------------- diff --git a/mac/build.command b/mac/build.command index b73c2805..57bc097d 100755 --- a/mac/build.command +++ b/mac/build.command @@ -1 +1,2 @@ -gcc -std=gnu99 -Wno-write-strings -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -I ../src/gpacmp4 -I ../src/lib_ccx -I ../src/libpng -I ../src/zlib -o ccextractor $(find ../src/ -name '*.cpp' \! -name 'win_*') $(find ../src/ -name '*.c' \! -name 'win_*') -liconv +gcc -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_DARWIN -D_FILE_OFFSET_BITS=64 -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -I ../src/gpacmp4 -I ../src/lib_ccx -I ../src/libpng -I ../src/zlib -o ccextractor $(find ../src/ -name '*.cpp' \! -name 'win_*') $(find ../src/ -name '*.c' \! -name 'win_*') -liconv + diff --git a/src/gpacmp4/gpac/isomedia.h b/src/gpacmp4/gpac/isomedia.h index b7de0540..81fa8946 100644 --- a/src/gpacmp4/gpac/isomedia.h +++ b/src/gpacmp4/gpac/isomedia.h @@ -227,7 +227,8 @@ enum GF_ISOM_SUBTYPE_LSR1 = GF_4CC( 'l', 's', 'r', '1' ), /* CAPTIONS */ - GF_ISOM_SUBTYPE_C608 = GF_4CC ('c', '6', '0', '8' ) + GF_ISOM_SUBTYPE_C608 = GF_4CC ('c', '6', '0', '8' ), + GF_ISOM_SUBTYPE_C708 = GF_4CC('c', '7', '0', '8') }; diff --git a/src/gpacmp4/mp4.c b/src/gpacmp4/mp4.c index c9be6273..2d96b9b1 100644 --- a/src/gpacmp4/mp4.c +++ b/src/gpacmp4/mp4.c @@ -285,7 +285,10 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx) } - if (type == GF_ISOM_MEDIA_CAPTIONS && subtype == GF_ISOM_SUBTYPE_C608) + if (type == GF_ISOM_MEDIA_CAPTIONS && + ( (subtype == GF_ISOM_SUBTYPE_C608) + //|| (subtype == GF_ISOM_SUBTYPE_C708) && 1) + ) { if (avc_track_count && ccx_options.mp4vidtrack) continue; @@ -340,7 +343,7 @@ int processmp4 (struct lib_ccx_ctx *ctx, char *file,void *enc_ctx) } data += 4; - if (!strncmp(data, "cdat", 4) || !strncmp(data, "cdt2", 4)) + if (!strncmp(data, "cdat", 4) || !strncmp(data, "cdt2", 4) ) { int ret = 0; int len = atomLength - 8;