]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Improve parse_tag().
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 20 Aug 2021 12:23:04 +0000 (14:23 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
commit1177d16193c6308c4cdffb9f0ea69ce731c8b1c1
treec8ee39a85ea64aae152ae6a9c969b05fa8016e94
parente4897ce9b79a58a0ccfe5f6fc2b6d4738710f93f
mp4: Improve parse_tag().

* Merge tag_add_field() and read_string() into parse_tag() since they
are simple enough and have only one caller.

* Avoid memory leaks in the error case.

* Let the function return an error code (rather than -1) in all cases,
and check the return value in the callers.

* Add a sanity check for the subsize.

* Avoid creating two copies of the tag value.

* Rename the variable for the tag value.
mp4.c