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
6b3b8c6f
Commit
6b3b8c6f
authored
Dec 20, 2013
by
Steven O'Brien
Committed by
Max Kellermann
Dec 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix FfmpegDecoderPlugin to use relative timestamps
parent
a191db84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
NEWS
NEWS
+2
-0
FfmpegDecoderPlugin.cxx
src/decoder/FfmpegDecoderPlugin.cxx
+6
-4
No files found.
NEWS
View file @
6b3b8c6f
...
@@ -3,6 +3,8 @@ ver 0.18.6 (not yet released)
...
@@ -3,6 +3,8 @@ ver 0.18.6 (not yet released)
- cdio_paranoia: support libcdio-paranoia 0.90
- cdio_paranoia: support libcdio-paranoia 0.90
* tags
* tags
- riff: recognize upper-case "ID3" chunk name
- riff: recognize upper-case "ID3" chunk name
* decoder
- ffmpeg: use relative timestamps
* output
* output
- openal: fix build failure on Mac OS X
- openal: fix build failure on Mac OS X
- osx: fix build failure
- osx: fix build failure
...
...
src/decoder/FfmpegDecoderPlugin.cxx
View file @
6b3b8c6f
...
@@ -251,13 +251,14 @@ static DecoderCommand
...
@@ -251,13 +251,14 @@ static DecoderCommand
ffmpeg_send_packet
(
Decoder
&
decoder
,
InputStream
&
is
,
ffmpeg_send_packet
(
Decoder
&
decoder
,
InputStream
&
is
,
const
AVPacket
*
packet
,
const
AVPacket
*
packet
,
AVCodecContext
*
codec_context
,
AVCodecContext
*
codec_context
,
const
AV
Rational
*
time_base
,
const
AV
Stream
*
stream
,
AVFrame
*
frame
,
AVFrame
*
frame
,
uint8_t
**
buffer
,
int
*
buffer_size
)
uint8_t
**
buffer
,
int
*
buffer_size
)
{
{
if
(
packet
->
pts
>=
0
&&
packet
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
if
(
packet
->
pts
>=
0
&&
packet
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
decoder_timestamp
(
decoder
,
decoder_timestamp
(
decoder
,
time_from_ffmpeg
(
packet
->
pts
,
*
time_base
));
time_from_ffmpeg
(
packet
->
pts
-
stream
->
start_time
,
stream
->
time_base
));
AVPacket
packet2
=
*
packet
;
AVPacket
packet2
=
*
packet
;
...
@@ -470,7 +471,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
...
@@ -470,7 +471,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
if
(
packet
.
stream_index
==
audio_stream
)
if
(
packet
.
stream_index
==
audio_stream
)
cmd
=
ffmpeg_send_packet
(
decoder
,
input
,
cmd
=
ffmpeg_send_packet
(
decoder
,
input
,
&
packet
,
codec_context
,
&
packet
,
codec_context
,
&
av_stream
->
time_base
,
av_stream
,
frame
,
frame
,
&
interleaved_buffer
,
&
interleaved_buffer_size
);
&
interleaved_buffer
,
&
interleaved_buffer_size
);
else
else
...
@@ -481,7 +482,8 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
...
@@ -481,7 +482,8 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
if
(
cmd
==
DecoderCommand
::
SEEK
)
{
if
(
cmd
==
DecoderCommand
::
SEEK
)
{
int64_t
where
=
int64_t
where
=
time_to_ffmpeg
(
decoder_seek_where
(
decoder
),
time_to_ffmpeg
(
decoder_seek_where
(
decoder
),
av_stream
->
time_base
);
av_stream
->
time_base
)
+
av_stream
->
start_time
;
if
(
av_seek_frame
(
format_context
,
audio_stream
,
where
,
if
(
av_seek_frame
(
format_context
,
audio_stream
,
where
,
AV_TIME_BASE
)
<
0
)
AV_TIME_BASE
)
<
0
)
...
...
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