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
9e4e35b4
Commit
9e4e35b4
authored
Mar 29, 2014
by
Timothy Gu
Committed by
Vittorio Giovara
Mar 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv_opt: fix avio_open2() return code check
avio_open2() only return < 0 when error.
parent
508a84e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
avconv_opt.c
avconv_opt.c
+3
-3
No files found.
avconv_opt.c
View file @
9e4e35b4
...
@@ -819,14 +819,14 @@ static uint8_t *get_line(AVIOContext *s)
...
@@ -819,14 +819,14 @@ static uint8_t *get_line(AVIOContext *s)
static
int
get_preset_file_2
(
const
char
*
preset_name
,
const
char
*
codec_name
,
AVIOContext
**
s
)
static
int
get_preset_file_2
(
const
char
*
preset_name
,
const
char
*
codec_name
,
AVIOContext
**
s
)
{
{
int
i
,
ret
=
1
;
int
i
,
ret
=
-
1
;
char
filename
[
1000
];
char
filename
[
1000
];
const
char
*
base
[
3
]
=
{
getenv
(
"AVCONV_DATADIR"
),
const
char
*
base
[
3
]
=
{
getenv
(
"AVCONV_DATADIR"
),
getenv
(
"HOME"
),
getenv
(
"HOME"
),
AVCONV_DATADIR
,
AVCONV_DATADIR
,
};
};
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
base
)
&&
ret
;
i
++
)
{
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
base
)
&&
ret
<
0
;
i
++
)
{
if
(
!
base
[
i
])
if
(
!
base
[
i
])
continue
;
continue
;
if
(
codec_name
)
{
if
(
codec_name
)
{
...
@@ -834,7 +834,7 @@ static int get_preset_file_2(const char *preset_name, const char *codec_name, AV
...
@@ -834,7 +834,7 @@ static int get_preset_file_2(const char *preset_name, const char *codec_name, AV
i
!=
1
?
""
:
"/.avconv"
,
codec_name
,
preset_name
);
i
!=
1
?
""
:
"/.avconv"
,
codec_name
,
preset_name
);
ret
=
avio_open2
(
s
,
filename
,
AVIO_FLAG_READ
,
&
int_cb
,
NULL
);
ret
=
avio_open2
(
s
,
filename
,
AVIO_FLAG_READ
,
&
int_cb
,
NULL
);
}
}
if
(
ret
)
{
if
(
ret
<
0
)
{
snprintf
(
filename
,
sizeof
(
filename
),
"%s%s/%s.avpreset"
,
base
[
i
],
snprintf
(
filename
,
sizeof
(
filename
),
"%s%s/%s.avpreset"
,
base
[
i
],
i
!=
1
?
""
:
"/.avconv"
,
preset_name
);
i
!=
1
?
""
:
"/.avconv"
,
preset_name
);
ret
=
avio_open2
(
s
,
filename
,
AVIO_FLAG_READ
,
&
int_cb
,
NULL
);
ret
=
avio_open2
(
s
,
filename
,
AVIO_FLAG_READ
,
&
int_cb
,
NULL
);
...
...
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