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
2994913d
Commit
2994913d
authored
Apr 18, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: fix a segfault when default encoder for a format doesn't exist.
Fail earlier and with a more descriptive error message.
parent
b5c3f0b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
avconv.c
avconv.c
+10
-8
No files found.
avconv.c
View file @
2994913d
...
...
@@ -2684,8 +2684,16 @@ static int transcode_init(void)
abort
();
}
}
else
{
if
(
!
ost
->
enc
)
ost
->
enc
=
avcodec_find_encoder
(
ost
->
st
->
codec
->
codec_id
);
if
(
!
ost
->
enc
)
{
/* should only happen when a default codec is not present. */
snprintf
(
error
,
sizeof
(
error
),
"Automatic encoder selection "
"failed for output stream #%d:%d. Default encoder for "
"format %s is probably disabled. Please choose an "
"encoder manually.
\n
"
,
ost
->
file_index
,
ost
->
index
,
oc
->
oformat
->
name
);
ret
=
AVERROR
(
EINVAL
);
goto
dump_format
;
}
if
(
ist
)
ist
->
decoding_needed
=
1
;
...
...
@@ -2819,12 +2827,6 @@ static int transcode_init(void)
if
(
ost
->
encoding_needed
)
{
AVCodec
*
codec
=
ost
->
enc
;
AVCodecContext
*
dec
=
NULL
;
if
(
!
codec
)
{
snprintf
(
error
,
sizeof
(
error
),
"Encoder (codec id %d) not found for output stream #%d:%d"
,
ost
->
st
->
codec
->
codec_id
,
ost
->
file_index
,
ost
->
index
);
ret
=
AVERROR
(
EINVAL
);
goto
dump_format
;
}
if
((
ist
=
get_input_stream
(
ost
)))
dec
=
ist
->
st
->
codec
;
...
...
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