From 25c208d81d341dd940b5b672af2442c0819e6bb6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 21:18:55 +0200 Subject: 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. --- src/input/FfmpegInputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input/FfmpegInputPlugin.cxx') diff --git a/src/input/FfmpegInputPlugin.cxx b/src/input/FfmpegInputPlugin.cxx index f8b948c43..60562062d 100644 --- a/src/input/FfmpegInputPlugin.cxx +++ b/src/input/FfmpegInputPlugin.cxx @@ -53,7 +53,7 @@ struct FfmpegInputStream { - since avio.h doesn't tell us the MIME type of the resource, we can't select a decoder plugin, but the "ffmpeg" plugin is quite good at auto-detection */ - base.mime = g_strdup("audio/x-mpd-ffmpeg"); + base.mime = "audio/x-mpd-ffmpeg"; } ~FfmpegInputStream() { -- cgit v1.2.3