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
8882f062
Commit
8882f062
authored
Nov 16, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: fixed AVSEEK_SIZE
With whence==AVSEEK_SIZE, the seek function should return the file size, not the current offset. Check the return value of input_stream_seek().
parent
9c4e97a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+9
-3
No files found.
src/decoder/ffmpeg_plugin.c
View file @
8882f062
...
...
@@ -89,9 +89,15 @@ static int mpd_ffmpeg_read(URLContext *h, unsigned char *buf, int size)
static
int64_t
mpd_ffmpeg_seek
(
URLContext
*
h
,
int64_t
pos
,
int
whence
)
{
struct
ffmpeg_stream
*
stream
=
(
struct
ffmpeg_stream
*
)
h
->
priv_data
;
if
(
whence
!=
AVSEEK_SIZE
)
{
//only ftell
(
void
)
input_stream_seek
(
stream
->
input
,
pos
,
whence
);
}
bool
ret
;
if
(
whence
==
AVSEEK_SIZE
)
return
stream
->
input
->
size
;
ret
=
input_stream_seek
(
stream
->
input
,
pos
,
whence
);
if
(
!
ret
)
return
-
1
;
return
stream
->
input
->
offset
;
}
...
...
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