Commit 0265c34b authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: free URI, fix memory leak

Free the string allocated by decoder_get_uri().
parent a1882f48
...@@ -5,6 +5,7 @@ ver 0.15.11 (2010/??/??) ...@@ -5,6 +5,7 @@ ver 0.15.11 (2010/??/??)
- mp4ff: support tags "album artist", "albumartist", "band" - mp4ff: support tags "album artist", "albumartist", "band"
- mikmod: fix memory leak - mikmod: fix memory leak
- vorbis: handle uri==NULL - vorbis: handle uri==NULL
- ffmpeg: fix memory leak
- ffmpeg: free AVFormatContext on error - ffmpeg: free AVFormatContext on error
- ffmpeg: read more metadata - ffmpeg: read more metadata
* playlist: emit IDLE_OPTIONS when resetting single mode * playlist: emit IDLE_OPTIONS when resetting single mode
......
...@@ -376,8 +376,10 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input) ...@@ -376,8 +376,10 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
ctx.input = input; ctx.input = input;
ctx.decoder = decoder; ctx.decoder = decoder;
ffmpeg_helper(decoder_get_uri(decoder), input, char *uri = decoder_get_uri(decoder);
ffmpeg_helper(uri, input,
ffmpeg_decode_internal, &ctx); ffmpeg_decode_internal, &ctx);
g_free(uri);
} }
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0) #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment