mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-11-16 17:21:13 +00:00
* [Fix] Fix issue #1421 * Fix header offset
This commit is contained in:
@@ -482,6 +482,10 @@ int isValidMP4Box(unsigned char *buffer, size_t position, size_t *nextBoxLocatio
|
||||
buffer[position + 6] == ccx_stream_mp4_boxes[idx].boxType[2] && buffer[position + 7] == ccx_stream_mp4_boxes[idx].boxType[3])
|
||||
{
|
||||
mprint("Detected MP4 box with name: %s\n", ccx_stream_mp4_boxes[idx].boxType);
|
||||
// If the box type is "moov", check if it contains a valid movie header
|
||||
if (idx == 2 && !( buffer[position + 12] == 'm' && buffer[position + 13] == 'v' && buffer[position + 14] == 'h' && buffer[position + 15] == 'd' )) {
|
||||
continue;
|
||||
}
|
||||
// Box name matches. Do crude validation of possible box size, and if valid, add points for "valid" box
|
||||
size_t boxSize = buffer[position] << 24;
|
||||
boxSize |= buffer[position + 1] << 16;
|
||||
|
||||
Reference in New Issue
Block a user