]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Rename and simplify set_metadata_name()
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Aug 2021 20:52:11 +0000 (22:52 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
commit5cc405db433ea1bc934503ebb457c639190c40a0
tree6de085ad4c15a383a757b3a58ff0d5c64439b78f
parentbcb1b6fdd7a95348403f77d209c09e885654f672
mp4: Rename and simplify set_metadata_name()

This function is an atrocious mess. For one, the naming is confusing
because the function does not set the atom name, it *returns* it.
More importantly, the function defines a static array for no good
reason and then hard-codes the array indices in a large switch
statement.

It's much easier to simply return a pointer to a string literal and
perform the strdup operation in the single caller.
mp4.c