Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3d7f4f87
Commit
3d7f4f87
authored
Feb 13, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/avio: check that the protocol supports the open mode.
Fix trac ticket #2139.
parent
bf0712c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
avio.c
libavformat/avio.c
+10
-0
No files found.
libavformat/avio.c
View file @
3d7f4f87
...
@@ -119,6 +119,16 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
...
@@ -119,6 +119,16 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
if
(
up
->
flags
&
URL_PROTOCOL_FLAG_NETWORK
&&
!
ff_network_init
())
if
(
up
->
flags
&
URL_PROTOCOL_FLAG_NETWORK
&&
!
ff_network_init
())
return
AVERROR
(
EIO
);
return
AVERROR
(
EIO
);
#endif
#endif
if
((
flags
&
AVIO_FLAG_READ
)
&&
!
up
->
url_read
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Impossible to open the '%s' protocol for reading
\n
"
,
up
->
name
);
return
AVERROR
(
EIO
);
}
if
((
flags
&
AVIO_FLAG_WRITE
)
&&
!
up
->
url_write
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Impossible to open the '%s' protocol for writing
\n
"
,
up
->
name
);
return
AVERROR
(
EIO
);
}
uc
=
av_mallocz
(
sizeof
(
URLContext
)
+
strlen
(
filename
)
+
1
);
uc
=
av_mallocz
(
sizeof
(
URLContext
)
+
strlen
(
filename
)
+
1
);
if
(
!
uc
)
{
if
(
!
uc
)
{
err
=
AVERROR
(
ENOMEM
);
err
=
AVERROR
(
ENOMEM
);
...
...
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