Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
9ce4212b
Commit
9ce4212b
authored
Dec 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libav: use vlc_strerror_c()
parent
a059cf56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
modules/access/avio.c
modules/access/avio.c
+10
-11
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+4
-4
modules/demux/avformat/mux.c
modules/demux/avformat/mux.c
+2
-2
No files found.
modules/access/avio.c
View file @
9ce4212b
...
...
@@ -163,8 +163,8 @@ int OpenAvio(vlc_object_t *object)
av_dict_free
(
&
options
);
#endif
if
(
ret
<
0
)
{
errno
=
AVUNERROR
(
ret
);
msg_Err
(
access
,
"Failed to open %s: %m"
,
url
);
msg_Err
(
access
,
"Failed to open %s: %s"
,
url
,
vlc_strerror_c
(
AVUNERROR
(
ret
))
);
free
(
url
);
goto
error
;
}
...
...
@@ -319,22 +319,20 @@ static ssize_t Write(sout_access_out_t *p_access, block_t *p_buffer)
{
access_sys_t
*
p_sys
=
(
access_sys_t
*
)
p_access
->
p_sys
;
size_t
i_write
=
0
;
int
val
;
while
(
p_buffer
!=
NULL
)
{
block_t
*
p_next
=
p_buffer
->
p_next
;
#if LIBAVFORMAT_VERSION_MAJOR < 54
int
written
=
url_write
(
p_sys
->
context
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
if
(
written
<
0
)
{
errno
=
AVUNERROR
(
written
);
val
=
url_write
(
p_sys
->
context
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
if
(
val
<
0
)
goto
error
;
}
i_write
+=
written
;
#else
avio_write
(
p_sys
->
context
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
avio_flush
(
p_sys
->
context
);
if
(
p_sys
->
context
->
error
)
{
errno
=
AVUNERROR
(
p_sys
->
context
->
error
);
if
((
val
=
p_sys
->
context
->
error
)
!=
0
)
{
p_sys
->
context
->
error
=
0
;
/* FIXME? */
goto
error
;
}
...
...
@@ -349,7 +347,8 @@ static ssize_t Write(sout_access_out_t *p_access, block_t *p_buffer)
return
i_write
;
error:
msg_Err
(
p_access
,
"Wrote only %zu bytes (%m)"
,
i_write
);
msg_Err
(
p_access
,
"Wrote only %zu bytes: %s"
,
i_write
,
vlc_strerror_c
(
AVUNERROR
(
val
)));
block_ChainRelease
(
p_buffer
);
return
i_write
;
}
...
...
@@ -368,8 +367,8 @@ static int Seek(access_t *access, uint64_t position)
else
ret
=
avio_seek
(
sys
->
context
,
position
,
SEEK_SET
);
if
(
ret
<
0
)
{
errno
=
AVUNERROR
(
ret
);
msg_Err
(
access
,
"Seek to %"
PRIu64
" failed: %m"
,
position
);
msg_Err
(
access
,
"Seek to %"
PRIu64
" failed: %s"
,
position
,
vlc_strerror_c
(
AVUNERROR
(
ret
))
);
if
(
sys
->
size
==
0
||
position
!=
sys
->
size
)
return
VLC_EGENERIC
;
}
...
...
modules/demux/avformat/demux.c
View file @
9ce4212b
...
...
@@ -223,8 +223,8 @@ int OpenDemux( vlc_object_t *p_this )
if
(
error
<
0
)
{
errno
=
AVUNERROR
(
error
);
msg_Err
(
p_demux
,
"Could not open %s: %m"
,
psz_url
);
msg_Err
(
p_demux
,
"Could not open %s: %s"
,
psz_url
,
vlc_strerror_c
(
AVUNERROR
(
error
))
);
p_sys
->
ic
=
NULL
;
free
(
psz_url
);
CloseDemux
(
p_this
);
...
...
@@ -266,8 +266,8 @@ int OpenDemux( vlc_object_t *p_this )
if
(
error
<
0
)
{
errno
=
AVUNERROR
(
error
);
msg_Warn
(
p_demux
,
"Could not find stream info: %m"
);
msg_Warn
(
p_demux
,
"Could not find stream info: %s"
,
vlc_strerror_c
(
AVUNERROR
(
error
))
);
}
for
(
i
=
0
;
i
<
p_sys
->
ic
->
nb_streams
;
i
++
)
...
...
modules/demux/avformat/mux.c
View file @
9ce4212b
...
...
@@ -340,8 +340,8 @@ static int Mux( sout_mux_t *p_mux )
av_dict_free
(
&
options
);
if
(
error
<
0
)
{
errno
=
AVUNERROR
(
error
);
msg_Err
(
p_mux
,
"could not write header: %m"
);
msg_Err
(
p_mux
,
"could not write header: %s"
,
vlc_strerror_c
(
AVUNERROR
(
error
))
);
p_sys
->
b_write_header
=
false
;
p_sys
->
b_error
=
true
;
return
VLC_EGENERIC
;
...
...
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