Skip to content
Permalink
Browse files Browse the repository at this point in the history
fixed #2163
  • Loading branch information
jeanlf committed Apr 12, 2022
1 parent 7caa230 commit 37592ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/isomedia/box_funcs.c
Expand Up @@ -310,8 +310,10 @@ GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type,
if (e && (e != GF_ISOM_INCOMPLETE_FILE)) {
gf_isom_box_del(newBox);
*outBox = NULL;
if (is_root_box && (e==GF_SKIP_BOX))
e = GF_ISOM_INVALID_FILE;

if (!skip_logs) {
if (!skip_logs && (e!=GF_SKIP_BOX)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Read Box \"%s\" (start "LLU") failed (%s) - skipping\n", gf_4cc_to_str(type), start, gf_error_to_string(e)));
}
//we don't try to reparse known boxes that have been failing (too dangerous)
Expand Down
3 changes: 2 additions & 1 deletion src/isomedia/isom_intern.c
Expand Up @@ -373,7 +373,8 @@ static GF_Err gf_isom_parse_movie_boxes_internal(GF_ISOFile *mov, u32 *boxType,
e = gf_isom_parse_root_box(&a, mov->movieFileMap->bs, boxType, bytesMissing, progressive_mode);

if (e >= 0) {

//safety check, should never happen
if (!a) return GF_ISOM_INVALID_FILE;
} else if (e == GF_ISOM_INCOMPLETE_FILE) {
/*our mdat is uncomplete, only valid for READ ONLY files...*/
if (mov->openMode != GF_ISOM_OPEN_READ) {
Expand Down

0 comments on commit 37592ad

Please sign in to comment.