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
094516a5
Commit
094516a5
authored
Jan 23, 2014
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use av_err2str() macro
Simplify.
parent
9f956d9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
ffmpeg.c
ffmpeg.c
+3
-10
No files found.
ffmpeg.c
View file @
094516a5
...
...
@@ -2106,16 +2106,13 @@ static int init_input_stream(int ist_index, char *error, int error_len)
if
(
!
av_dict_get
(
ist
->
opts
,
"threads"
,
NULL
,
0
))
av_dict_set
(
&
ist
->
opts
,
"threads"
,
"auto"
,
0
);
if
((
ret
=
avcodec_open2
(
ist
->
st
->
codec
,
codec
,
&
ist
->
opts
))
<
0
)
{
char
errbuf
[
128
];
if
(
ret
==
AVERROR_EXPERIMENTAL
)
abort_codec_experimental
(
codec
,
0
);
av_strerror
(
ret
,
errbuf
,
sizeof
(
errbuf
));
snprintf
(
error
,
error_len
,
"Error while opening decoder for input stream "
"#%d:%d : %s"
,
ist
->
file_index
,
ist
->
st
->
index
,
errbuf
);
ist
->
file_index
,
ist
->
st
->
index
,
av_err2str
(
ret
)
);
return
ret
;
}
assert_avoptions
(
ist
->
opts
);
...
...
@@ -2670,12 +2667,10 @@ static int transcode_init(void)
oc
=
output_files
[
i
]
->
ctx
;
oc
->
interrupt_callback
=
int_cb
;
if
((
ret
=
avformat_write_header
(
oc
,
&
output_files
[
i
]
->
opts
))
<
0
)
{
char
errbuf
[
128
];
av_strerror
(
ret
,
errbuf
,
sizeof
(
errbuf
));
snprintf
(
error
,
sizeof
(
error
),
"Could not write header for output file #%d "
"(incorrect codec parameters ?): %s"
,
i
,
errbuf
);
i
,
av_err2str
(
ret
)
);
ret
=
AVERROR
(
EINVAL
);
goto
dump_format
;
}
...
...
@@ -3244,10 +3239,8 @@ static int process_input(int file_index)
ret
=
output_packet
(
ist
,
&
pkt
);
if
(
ret
<
0
)
{
char
buf
[
128
];
av_strerror
(
ret
,
buf
,
sizeof
(
buf
));
av_log
(
NULL
,
AV_LOG_ERROR
,
"Error while decoding stream #%d:%d: %s
\n
"
,
ist
->
file_index
,
ist
->
st
->
index
,
buf
);
ist
->
file_index
,
ist
->
st
->
index
,
av_err2str
(
ret
)
);
if
(
exit_on_error
)
exit_program
(
1
);
}
...
...
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