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
7f98ba24
Commit
7f98ba24
authored
Dec 24, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: case AV_NOPTS_VALUE to int64_t
The old code casted it to a 32 bit integer, which cut off bits. AVFormatContext.duration is a int64_t, so use this type.
parent
82ef85a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+2
-2
No files found.
src/decoder/ffmpeg_plugin.c
View file @
7f98ba24
...
...
@@ -279,7 +279,7 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
}
//there is some problem with this on some demux (mp3 at least)
if
(
format_context
->
duration
!=
(
int
)
AV_NOPTS_VALUE
)
{
if
(
format_context
->
duration
!=
(
int
64_t
)
AV_NOPTS_VALUE
)
{
total_time
=
format_context
->
duration
/
AV_TIME_BASE
;
}
...
...
@@ -330,7 +330,7 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx)
const
AVFormatContext
*
f
=
ctx
->
format_context
;
tag
->
time
=
0
;
if
(
f
->
duration
!=
(
int
)
AV_NOPTS_VALUE
)
if
(
f
->
duration
!=
(
int
64_t
)
AV_NOPTS_VALUE
)
tag
->
time
=
f
->
duration
/
AV_TIME_BASE
;
if
(
f
->
author
[
0
])
tag_add_item
(
tag
,
TAG_ITEM_ARTIST
,
f
->
author
);
...
...
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