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
9aa91e0f
Commit
9aa91e0f
authored
Sep 15, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: move formula to time_from_ffmpeg()
parent
5aabee89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
ffmpeg_decoder_plugin.c
src/decoder/ffmpeg_decoder_plugin.c
+10
-2
No files found.
src/decoder/ffmpeg_decoder_plugin.c
View file @
9aa91e0f
...
...
@@ -214,6 +214,15 @@ align16(void *p, size_t *length_p)
return
(
char
*
)
p
+
add
;
}
G_GNUC_CONST
static
double
time_from_ffmpeg
(
int64_t
t
,
const
AVRational
time_base
)
{
assert
(
t
!=
(
int64_t
)
AV_NOPTS_VALUE
);
return
av_rescale_q
(
t
,
time_base
,
(
AVRational
){
1
,
1
});
}
static
enum
decoder_command
ffmpeg_send_packet
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
,
const
AVPacket
*
packet
,
...
...
@@ -222,8 +231,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
{
if
(
packet
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
)
decoder_timestamp
(
decoder
,
av_rescale_q
(
packet
->
pts
,
*
time_base
,
(
AVRational
){
1
,
1
}));
time_from_ffmpeg
(
packet
->
pts
,
*
time_base
));
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,0)
AVPacket
packet2
=
*
packet
;
...
...
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