]> git.tue.mpg.de Git - paraslash.git/commitdiff
mp4: Remove pointless casts in create_ilst().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Aug 2021 22:19:56 +0000 (00:19 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
They have no effect because membuffer_write_int16_tag() takes a
unit16_t value anyway.

mp4.c

diff --git a/mp4.c b/mp4.c
index 3765d813875ec4635cbf761982a24d3d2e4aa652..ae2488996d40044c3258a77552ff84552fa5c27b 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -1835,8 +1835,7 @@ static uint32_t create_ilst(const struct mp4ff_metadata *data, void **out_buffer
                                          myatoi(discnumber_ptr),
                                          myatoi(totaldiscs_ptr));
        if (tempo_ptr)
-               membuffer_write_int16_tag(buf, "tmpo",
-                                         (uint16_t) myatoi(tempo_ptr));
+               membuffer_write_int16_tag(buf, "tmpo", myatoi(tempo_ptr));
 
        if (genre_ptr) {
                uint32_t index = meta_genre_to_index(genre_ptr);
@@ -1844,8 +1843,7 @@ static uint32_t create_ilst(const struct mp4ff_metadata *data, void **out_buffer
                        membuffer_write_std_tag(buf, "©gen",
                                                genre_ptr);
                else
-                       membuffer_write_int16_tag(buf, "gnre",
-                                                 (uint16_t) index);
+                       membuffer_write_int16_tag(buf, "gnre", index);
        }
        for (metaptr = 0; metaptr < data->count; metaptr++) {
                if (!mask[metaptr]) {