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
1c02b4b9
Commit
1c02b4b9
authored
11 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'release-0.18.10'
parents
afdefefb
d0119548
sisyphus
0.23.15-alt1
0.23.14-alt1
0.23.13-alt1
0.23.12-alt1
0.23.11-alt1
0.23.8-alt3
0.23.8-alt2
0.23.8-alt1
0.21.24-alt1.1
0.21.24-alt1
0.20.23-alt3
0.20.23-alt2
0.20.23-alt1
0.20.21-alt1
0.20.15-alt1
mpd/0.20.6-alt1
mpd/0.19.9-alt1
gb-sisyphus-task339776.6100
gb-sisyphus-task337393.100
gb-sisyphus-task337176.300
gb-sisyphus-task334590.100
gb-sisyphus-task333607.100
gb-sisyphus-task331543.2500
gb-sisyphus-task328663.4700
gb-sisyphus-task325064.100
gb-sisyphus-task319111.4000
gb-sisyphus-task313704.100
gb-sisyphus-task312885.100
gb-sisyphus-task308905.3200
gb-sisyphus-task305294.500
gb-sisyphus-task304007.100
gb-sisyphus-task303674.1700
gb-sisyphus-task298681.300
gb-sisyphus-task296051.1000
gb-sisyphus-task274827.100
gb-sisyphus-task269249.2000
gb-sisyphus-task266579.400
gb-sisyphus-task258132.600
gb-sisyphus-task254601.200
gb-sisyphus-task253310.100
gb-sisyphus-task252214.300
gb-sisyphus-task251539.6100
gb-sisyphus-task247988.7000
gb-sisyphus-task238768.6000
gb-sisyphus-task229151.100
gb-sisyphus-task227574.200
gb-sisyphus-task226762.6000
gb-sisyphus-task219546.1700
gb-sisyphus-task213491.100
gb-sisyphus-task198806.100
gb-sisyphus-task181400.100
gb-sisyphus-task141957.100
gb-p9-task277538.2600
gb-c9f2-task327704.1100
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
19 deletions
+63
-19
NEWS
NEWS
+8
-0
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+26
-3
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+1
-0
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+20
-6
PlaylistEdit.cxx
src/queue/PlaylistEdit.cxx
+8
-10
No files found.
NEWS
View file @
1c02b4b9
...
...
@@ -41,6 +41,14 @@ ver 0.19 (not yet released)
* install systemd unit for socket activation
* Android port
ver 0.18.10 (2014/04/10)
* decoder
- ffmpeg: fix seeking bug
- ffmpeg: handle unknown stream start time
- gme: fix memory leak
- sndfile: work around libsndfile bug on partial read
* don't interrupt playback when current song gets deleted
ver 0.18.9 (2014/03/02)
* protocol
- "findadd" requires the "add" permission
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
1c02b4b9
...
...
@@ -197,6 +197,29 @@ time_to_ffmpeg(double t, const AVRational time_base)
time_base
);
}
/**
* Replace #AV_NOPTS_VALUE with the given fallback.
*/
static
constexpr
int64_t
timestamp_fallback
(
int64_t
t
,
int64_t
fallback
)
{
return
gcc_likely
(
t
!=
int64_t
(
AV_NOPTS_VALUE
))
?
t
:
fallback
;
}
/**
* Accessor for AVStream::start_time that replaces AV_NOPTS_VALUE with
* zero. We can't use AV_NOPTS_VALUE in calculations, and we simply
* assume that the stream's start time is zero, which appears to be
* the best way out of that situation.
*/
static
int64_t
start_time_fallback
(
const
AVStream
&
stream
)
{
return
timestamp_fallback
(
stream
.
start_time
,
0
);
}
static
void
copy_interleave_frame2
(
uint8_t
*
dest
,
uint8_t
**
src
,
unsigned
nframes
,
unsigned
nchannels
,
...
...
@@ -263,7 +286,7 @@ ffmpeg_send_packet(Decoder &decoder, InputStream &is,
{
if
(
packet
->
pts
>=
0
&&
packet
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
decoder_timestamp
(
decoder
,
time_from_ffmpeg
(
packet
->
pts
-
st
ream
->
start_time
,
time_from_ffmpeg
(
packet
->
pts
-
st
art_time_fallback
(
*
stream
)
,
stream
->
time_base
));
AVPacket
packet2
=
*
packet
;
...
...
@@ -496,10 +519,10 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
int64_t
where
=
time_to_ffmpeg
(
decoder_seek_where
(
decoder
),
av_stream
->
time_base
)
+
av_stream
->
start_time
;
start_time_fallback
(
*
av_stream
)
;
if
(
av_seek_frame
(
format_context
,
audio_stream
,
where
,
AV
_TIME_BASE
)
<
0
)
AV
SEEK_FLAG_ANY
)
<
0
)
decoder_seek_error
(
decoder
);
else
{
avcodec_flush_buffers
(
codec_context
);
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
1c02b4b9
...
...
@@ -120,6 +120,7 @@ gme_container_scan(Path path_fs, const unsigned int tnum)
}
const
unsigned
num_songs
=
gme_track_count
(
emu
);
gme_delete
(
emu
);
/* if it only contains a single tune, don't treat as container */
if
(
num_songs
<
2
)
return
nullptr
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
1c02b4b9
...
...
@@ -56,14 +56,28 @@ sndfile_vio_read(void *ptr, sf_count_t count, void *user_data)
{
InputStream
&
is
=
*
(
InputStream
*
)
user_data
;
sf_count_t
total_bytes
=
0
;
Error
error
;
size_t
nbytes
=
is
.
LockRead
(
ptr
,
count
,
error
);
if
(
nbytes
==
0
&&
error
.
IsDefined
())
{
LogError
(
error
);
return
-
1
;
}
return
nbytes
;
/* this loop is necessary because libsndfile chokes on partial
reads */
do
{
size_t
nbytes
=
is
.
LockRead
((
char
*
)
ptr
+
total_bytes
,
count
-
total_bytes
,
error
);
if
(
nbytes
==
0
)
{
if
(
error
.
IsDefined
())
{
LogError
(
error
);
return
-
1
;
}
break
;
}
total_bytes
+=
nbytes
;
}
while
(
total_bytes
<
count
);
return
total_bytes
;
}
static
sf_count_t
...
...
This diff is collapsed.
Click to expand it.
src/queue/PlaylistEdit.cxx
View file @
1c02b4b9
...
...
@@ -204,12 +204,8 @@ playlist::DeleteInternal(PlayerControl &pc,
if
(
playing
&&
current
==
(
int
)
songOrder
)
{
const
bool
paused
=
pc
.
GetState
()
==
PlayerState
::
PAUSE
;
/* the current song is going to be deleted: stop the player */
pc
.
Stop
();
playing
=
false
;
/* see which song is going to be played instead */
/* the current song is going to be deleted: see which
song is going to be played instead */
current
=
queue
.
GetNextOrder
(
current
);
if
(
current
==
(
int
)
songOrder
)
...
...
@@ -218,10 +214,12 @@ playlist::DeleteInternal(PlayerControl &pc,
if
(
current
>=
0
&&
!
paused
)
/* play the song after the deleted one */
PlayOrder
(
pc
,
current
);
else
/* no songs left to play, stop playback
completely */
Stop
(
pc
);
else
{
/* stop the player */
pc
.
Stop
();
playing
=
false
;
}
*
queued_p
=
nullptr
;
}
else
if
(
current
==
(
int
)
songOrder
)
...
...
This diff is collapsed.
Click to expand it.
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