Skip to content

Commit

Permalink
gain some .rodata from DMAP decoder (unused strings)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Apr 2, 2023
1 parent 27a0d2a commit cbc1ab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/raop/dmap_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static const dmap_field dmap_fields[] = {
{ "abar", DMAP_DICT, DMAP_STR, "daap.browseartistlisting" },
{ "abcp", DMAP_DICT, DMAP_STR, "daap.browsecomposerlisting" },
{ "abgn", DMAP_DICT, DMAP_STR, "daap.browsegenrelisting" },
#ifdef DMAP_FULL
{ "abpl", DMAP_UINT, 0, "daap.baseplaylist" },
{ "abro", DMAP_DICT, 0, "daap.databasebrowse" },
{ "adbs", DMAP_DICT, 0, "daap.databasesongs" },
Expand Down Expand Up @@ -256,10 +257,12 @@ static const dmap_field dmap_fields[] = {
{ "meia", DMAP_UINT, 0, "dmap.itemdateadded" },
{ "meip", DMAP_UINT, 0, "dmap.itemdateplayed" },
{ "mext", DMAP_UINT, 0, "dmap.objectextradata" },
#endif
{ "miid", DMAP_UINT, 0, "dmap.itemid" },
{ "mikd", DMAP_UINT, 0, "dmap.itemkind" },
{ "mimc", DMAP_UINT, 0, "dmap.itemcount" },
{ "minm", DMAP_STR, 0, "dmap.itemname" },
#ifdef DMAP_FULL
{ "mlcl", DMAP_DICT, DMAP_DICT, "dmap.listing" },
{ "mlid", DMAP_UINT, 0, "dmap.sessionid" },
{ "mlit", DMAP_ITEM, 0, "dmap.listingitem" },
Expand Down Expand Up @@ -314,6 +317,7 @@ static const dmap_field dmap_fields[] = {
{ "prat", DMAP_UINT, 0, "dpap.imagerating" },
{ "pret", DMAP_DICT, 0, "dpap.retryids" },
{ "pwth", DMAP_UINT, 0, "dpap.imagepixelwidth" }
#endif
};
static const size_t dmap_field_count = sizeof(dmap_fields) / sizeof(dmap_field);

Expand Down
2 changes: 1 addition & 1 deletion components/raop/raop.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ static int base64_decode(const char *str, void *data)
/*----------------------------------------------------------------------------*/
static void on_dmap_string(void *ctx, const char *code, const char *name, const char *buf, size_t len) {
struct metadata_s *metadata = (struct metadata_s *) ctx;

// to gain space, most of the code have been removed from dmap_parser.c (define DMAP_FULL)
if (!strcasecmp(code, "asar")) metadata->artist = strndup(buf, len);
else if (!strcasecmp(code, "asal")) metadata->album = strndup(buf, len);
else if (!strcasecmp(code, "minm")) metadata->title = strndup(buf, len);
Expand Down

0 comments on commit cbc1ab3

Please sign in to comment.