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
9ce0e19a
Commit
9ce0e19a
authored
Jul 21, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/caca: provide more meaningful feedback if fails to set a dither option
parent
fa71471c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
caca.c
libavdevice/caca.c
+10
-8
No files found.
libavdevice/caca.c
View file @
9ce0e19a
...
...
@@ -153,15 +153,17 @@ static int caca_write_header(AVFormatContext *s)
goto
fail
;
}
ret
=
caca_set_dither_algorithm
(
c
->
dither
,
c
->
algorithm
);
ret
+=
caca_set_dither_antialias
(
c
->
dither
,
c
->
antialias
);
ret
+=
caca_set_dither_charset
(
c
->
dither
,
c
->
charset
);
ret
+=
caca_set_dither_color
(
c
->
dither
,
c
->
colors
);
if
(
ret
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid value given to one of options
\n
"
);
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
#define CHECK_DITHER_OPT(opt) \
if (caca_set_dither_##opt(c->dither, c->opt) < 0) { \
ret = AVERROR(errno); \
av_log(s, AV_LOG_ERROR, "Failed to set value '%s' for option '%s'\n", \
c->opt, #opt); \
goto fail; \
}
CHECK_DITHER_OPT
(
algorithm
);
CHECK_DITHER_OPT
(
antialias
);
CHECK_DITHER_OPT
(
charset
);
CHECK_DITHER_OPT
(
color
);
if
(
!
c
->
window_title
)
c
->
window_title
=
av_strdup
(
s
->
filename
);
...
...
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