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
cd7a7204
Commit
cd7a7204
authored
Oct 30, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: simplified mpdurl_read()
The function mpdurl_read() is too complicated, and uses the wrong data types.
parent
964442c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+11
-13
No files found.
src/decoder/ffmpeg_plugin.c
View file @
cd7a7204
...
...
@@ -82,22 +82,20 @@ static int mpdurl_open(URLContext *h, const char *filename,
static
int
mpdurl_read
(
URLContext
*
h
,
unsigned
char
*
buf
,
int
size
)
{
int
ret
;
FopsHelper
*
base
=
(
FopsHelper
*
)
h
->
priv_data
;
while
(
true
)
{
ret
=
input_stream_read
(
base
->
input
,
(
void
*
)
buf
,
size
);
if
(
ret
==
0
)
{
if
(
input_stream_eof
(
base
->
input
)
||
(
base
->
decoder
&&
decoder_get_command
(
base
->
decoder
)
!=
DECODE_COMMAND_NONE
))
return
ret
;
else
my_usleep
(
10000
);
}
else
{
break
;
}
size_t
ret
=
input_stream_read
(
base
->
input
,
(
void
*
)
buf
,
size
);
if
(
ret
>
0
)
return
ret
;
if
(
input_stream_eof
(
base
->
input
)
||
(
base
->
decoder
&&
decoder_get_command
(
base
->
decoder
)
!=
DECODE_COMMAND_NONE
))
return
0
;
my_usleep
(
10000
);
}
return
ret
;
}
static
int64_t
mpdurl_seek
(
URLContext
*
h
,
int64_t
pos
,
int
whence
)
...
...
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