Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
25c208d8
Commit
25c208d8
authored
Oct 15, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
67f87db5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
CdioParanoiaInputPlugin.cxx
src/input/CdioParanoiaInputPlugin.cxx
+2
-2
DespotifyInputPlugin.cxx
src/input/DespotifyInputPlugin.cxx
+1
-1
FfmpegInputPlugin.cxx
src/input/FfmpegInputPlugin.cxx
+1
-1
MmsInputPlugin.cxx
src/input/MmsInputPlugin.cxx
+1
-1
No files found.
src/input/CdioParanoiaInputPlugin.cxx
View file @
25c208d8
...
@@ -240,9 +240,9 @@ input_cdio_open(const char *uri,
...
@@ -240,9 +240,9 @@ input_cdio_open(const char *uri,
i
->
base
.
size
=
(
i
->
lsn_to
-
i
->
lsn_from
+
1
)
*
CDIO_CD_FRAMESIZE_RAW
;
i
->
base
.
size
=
(
i
->
lsn_to
-
i
->
lsn_from
+
1
)
*
CDIO_CD_FRAMESIZE_RAW
;
/* hack to make MPD select the "pcm" decoder plugin */
/* hack to make MPD select the "pcm" decoder plugin */
i
->
base
.
mime
=
g_strdup
(
reverse_endian
i
->
base
.
mime
=
reverse_endian
?
"audio/x-mpd-cdda-pcm-reverse"
?
"audio/x-mpd-cdda-pcm-reverse"
:
"audio/x-mpd-cdda-pcm"
)
;
:
"audio/x-mpd-cdda-pcm"
;
return
&
i
->
base
;
return
&
i
->
base
;
}
}
...
...
src/input/DespotifyInputPlugin.cxx
View file @
25c208d8
...
@@ -60,7 +60,7 @@ struct DespotifyInputStream {
...
@@ -60,7 +60,7 @@ struct DespotifyInputStream {
memset
(
&
pcm
,
0
,
sizeof
(
pcm
));
memset
(
&
pcm
,
0
,
sizeof
(
pcm
));
/* Despotify outputs pcm data */
/* Despotify outputs pcm data */
base
.
mime
=
g_strdup
(
"audio/x-mpd-cdda-pcm"
)
;
base
.
mime
=
"audio/x-mpd-cdda-pcm"
;
base
.
ready
=
true
;
base
.
ready
=
true
;
}
}
...
...
src/input/FfmpegInputPlugin.cxx
View file @
25c208d8
...
@@ -53,7 +53,7 @@ struct FfmpegInputStream {
...
@@ -53,7 +53,7 @@ struct FfmpegInputStream {
- since avio.h doesn't tell us the MIME type of the
- since avio.h doesn't tell us the MIME type of the
resource, we can't select a decoder plugin, but the
resource, we can't select a decoder plugin, but the
"ffmpeg" plugin is quite good at auto-detection */
"ffmpeg" plugin is quite good at auto-detection */
base
.
mime
=
g_strdup
(
"audio/x-mpd-ffmpeg"
)
;
base
.
mime
=
"audio/x-mpd-ffmpeg"
;
}
}
~
FfmpegInputStream
()
{
~
FfmpegInputStream
()
{
...
...
src/input/MmsInputPlugin.cxx
View file @
25c208d8
...
@@ -45,7 +45,7 @@ struct MmsInputStream {
...
@@ -45,7 +45,7 @@ struct MmsInputStream {
mms
(
_mms
),
eof
(
false
)
{
mms
(
_mms
),
eof
(
false
)
{
/* XX is this correct? at least this selects the ffmpeg
/* XX is this correct? at least this selects the ffmpeg
decoder, which seems to work fine*/
decoder, which seems to work fine*/
base
.
mime
=
g_strdup
(
"audio/x-ms-wma"
)
;
base
.
mime
=
"audio/x-ms-wma"
;
base
.
ready
=
true
;
base
.
ready
=
true
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment