]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Simplify parse_tag().
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 13 Aug 2021 18:19:43 +0000 (20:19 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
commit06dd900e86fee406c52f18b7dcf81f7487cb7cb6
treed902725d410efdc3700faecefdf7b839aade3357
parent61e74c29645459c59b29fa8c8efdeb5faeab8b95
mp4: Simplify parse_tag().

We don't care about arbitrarily named tags, and those tags we're
interested in are generally present in form of the standard tags
(ATOM_TITLE, ATOM_ARTIST etc.).

Since we now always call get_metadata_name() to get the string
representation of the tag, we don't need to make a copy any more,
just pass the const pointer directly to tag_add_field().

With this change in place it is obvious that we never pass a NULL or
empty tag name to tag_add_field(), and we don't pass a NULL pointer
for the value argument either, so remove the safety check.
mp4.c