aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-30 23:40:04 +0200
committerMax Kellermann <max@duempel.org>2010-06-30 23:40:04 +0200
commit0265c34bed4bdfd45a4ef1b5ff73071c5d5a5e10 (patch)
tree7b8ba1a0670ae227c6483c38be6911e2d7e80cbf /src/decoder/ffmpeg_plugin.c
parenta1882f48beee0c1b6750ec03f8b133e7325057a9 (diff)
downloadmpd-0265c34bed4bdfd45a4ef1b5ff73071c5d5a5e10.tar.gz
mpd-0265c34bed4bdfd45a4ef1b5ff73071c5d5a5e10.tar.xz
mpd-0265c34bed4bdfd45a4ef1b5ff73071c5d5a5e10.zip
decoder/ffmpeg: free URI, fix memory leak
Free the string allocated by decoder_get_uri().
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 7f2207669..fc402ca04 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -376,8 +376,10 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
ctx.input = input;
ctx.decoder = decoder;
- ffmpeg_helper(decoder_get_uri(decoder), input,
+ char *uri = decoder_get_uri(decoder);
+ ffmpeg_helper(uri, input,
ffmpeg_decode_internal, &ctx);
+ g_free(uri);
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)