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
12ba1957
Commit
12ba1957
authored
Aug 18, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/ffmpeg: use "auto"
parent
9b9d189a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+10
-10
No files found.
src/input/plugins/FfmpegInputPlugin.cxx
View file @
12ba1957
...
...
@@ -101,9 +101,9 @@ input_ffmpeg_open(const char *uri,
return
nullptr
;
AVIOContext
*
h
;
int
re
t
=
avio_open
(
&
h
,
uri
,
AVIO_FLAG_READ
);
if
(
ret
!=
0
)
{
error
.
Set
(
ffmpeg_domain
,
ret
,
auto
resul
t
=
avio_open
(
&
h
,
uri
,
AVIO_FLAG_READ
);
if
(
re
sul
t
!=
0
)
{
error
.
Set
(
ffmpeg_domain
,
re
sul
t
,
"libavformat failed to open the URI"
);
return
nullptr
;
}
...
...
@@ -114,17 +114,17 @@ input_ffmpeg_open(const char *uri,
size_t
FfmpegInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
,
Error
&
error
)
{
int
re
t
=
avio_read
(
h
,
(
unsigned
char
*
)
ptr
,
read_size
);
if
(
ret
<=
0
)
{
if
(
ret
<
0
)
auto
resul
t
=
avio_read
(
h
,
(
unsigned
char
*
)
ptr
,
read_size
);
if
(
re
sul
t
<=
0
)
{
if
(
re
sul
t
<
0
)
error
.
Set
(
ffmpeg_domain
,
"avio_read() failed"
);
eof
=
true
;
return
false
;
}
offset
+=
ret
;
return
(
size_t
)
ret
;
offset
+=
re
sul
t
;
return
(
size_t
)
re
sul
t
;
}
bool
...
...
@@ -136,9 +136,9 @@ FfmpegInputStream::IsEOF()
bool
FfmpegInputStream
::
Seek
(
offset_type
new_offset
,
Error
&
error
)
{
int64_t
re
t
=
avio_seek
(
h
,
new_offset
,
SEEK_SET
);
auto
resul
t
=
avio_seek
(
h
,
new_offset
,
SEEK_SET
);
if
(
ret
>=
0
)
{
if
(
re
sul
t
>=
0
)
{
eof
=
false
;
return
true
;
}
else
{
...
...
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