]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Eliminate duplication between the two open functions.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Aug 2021 15:56:17 +0000 (17:56 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:36 +0000 (21:37 +0200)
commit1879b0474c3de06f4a07af5cfff1eb6e94b5f622
tree5bd8f0bf9844f9c145e5e6fd35998583c8eaf3ca
parentf3e604aba139ae764a9606bc4aad3399143ae256
mp4: Eliminate duplication between the two open functions.

The only difference between mp4_open_read() and mp4_open_meta()
is that they pass different values for the meta_only flag to
parse_root_atoms(). We can avoid some duplication by moving the
common code to parse_root_atoms(). Rename that function to open_file()
because it now does more than just parsing atoms.

The patch also changes the prototype of both public open functions
to return an integer error code in addition to the pointer to an mp4
structure. This allows us to gradually improve the error diagnostics.
aac_afh.c
mp4.c
mp4.h