input/*: don't allocate attribute "mime"

This was a memory leak, because "mime" was a std::string which created
another copy and discarded the allocated buffer.
This commit is contained in:
Max Kellermann
2013-10-15 21:18:55 +02:00
parent 67f87db511
commit 25c208d81d
4 changed files with 6 additions and 6 deletions

View File

@@ -240,9 +240,9 @@ input_cdio_open(const char *uri,
i->base.size = (i->lsn_to - i->lsn_from + 1) * CDIO_CD_FRAMESIZE_RAW;
/* hack to make MPD select the "pcm" decoder plugin */
i->base.mime = g_strdup(reverse_endian
? "audio/x-mpd-cdda-pcm-reverse"
: "audio/x-mpd-cdda-pcm");
i->base.mime = reverse_endian
? "audio/x-mpd-cdda-pcm-reverse"
: "audio/x-mpd-cdda-pcm";
return &i->base;
}