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
129d7371
Commit
129d7371
authored
Dec 08, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/opt: make av_opt_query_ranges_default() return a meaningful error code
parent
e5550c0d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
opt.c
libavutil/opt.c
+6
-2
No files found.
libavutil/opt.c
View file @
129d7371
...
...
@@ -1228,11 +1228,14 @@ int av_opt_query_ranges_default(AVOptionRanges **ranges_arg, void *obj, const ch
AVOptionRange
**
range_array
=
av_mallocz
(
sizeof
(
void
*
));
AVOptionRange
*
range
=
av_mallocz
(
sizeof
(
*
range
));
const
AVOption
*
field
=
av_opt_find
(
obj
,
key
,
NULL
,
0
,
flags
);
int
ret
;
*
ranges_arg
=
NULL
;
if
(
!
ranges
||
!
range
||
!
range_array
||
!
field
)
if
(
!
ranges
||
!
range
||
!
range_array
||
!
field
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
ranges
->
range
=
range_array
;
ranges
->
range
[
0
]
=
range
;
...
...
@@ -1266,6 +1269,7 @@ int av_opt_query_ranges_default(AVOptionRanges **ranges_arg, void *obj, const ch
range
->
value_max
=
INT_MAX
/
8
;
break
;
default
:
ret
=
AVERROR
(
ENOSYS
);
goto
fail
;
}
...
...
@@ -1274,7 +1278,7 @@ int av_opt_query_ranges_default(AVOptionRanges **ranges_arg, void *obj, const ch
fail
:
av_free
(
ranges
);
av_free
(
range
);
return
-
1
;
return
ret
;
}
void
av_opt_freep_ranges
(
AVOptionRanges
**
rangesp
)
...
...
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