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
cb134385
Commit
cb134385
authored
Aug 30, 2011
by
Alex Converse
Committed by
Michael Niedermayer
Aug 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: Set error code before before jumping to fail.
parent
6e6ccf0d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
ffmpeg.c
ffmpeg.c
+9
-3
No files found.
ffmpeg.c
View file @
cb134385
...
@@ -1971,8 +1971,10 @@ static int transcode(OutputFile *output_files,
...
@@ -1971,8 +1971,10 @@ static int transcode(OutputFile *output_files,
if
(
ost
->
st
->
stream_copy
)
{
if
(
ost
->
st
->
stream_copy
)
{
uint64_t
extra_size
=
(
uint64_t
)
icodec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
;
uint64_t
extra_size
=
(
uint64_t
)
icodec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
;
if
(
extra_size
>
INT_MAX
)
if
(
extra_size
>
INT_MAX
)
{
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
goto
fail
;
}
/* if stream_copy is selected, no need to decode or encode */
/* if stream_copy is selected, no need to decode or encode */
codec
->
codec_id
=
icodec
->
codec_id
;
codec
->
codec_id
=
icodec
->
codec_id
;
...
@@ -1989,8 +1991,10 @@ static int transcode(OutputFile *output_files,
...
@@ -1989,8 +1991,10 @@ static int transcode(OutputFile *output_files,
codec
->
rc_max_rate
=
icodec
->
rc_max_rate
;
codec
->
rc_max_rate
=
icodec
->
rc_max_rate
;
codec
->
rc_buffer_size
=
icodec
->
rc_buffer_size
;
codec
->
rc_buffer_size
=
icodec
->
rc_buffer_size
;
codec
->
extradata
=
av_mallocz
(
extra_size
);
codec
->
extradata
=
av_mallocz
(
extra_size
);
if
(
!
codec
->
extradata
)
if
(
!
codec
->
extradata
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
goto
fail
;
}
memcpy
(
codec
->
extradata
,
icodec
->
extradata
,
icodec
->
extradata_size
);
memcpy
(
codec
->
extradata
,
icodec
->
extradata
,
icodec
->
extradata_size
);
codec
->
extradata_size
=
icodec
->
extradata_size
;
codec
->
extradata_size
=
icodec
->
extradata_size
;
...
@@ -2055,8 +2059,10 @@ static int transcode(OutputFile *output_files,
...
@@ -2055,8 +2059,10 @@ static int transcode(OutputFile *output_files,
switch
(
codec
->
codec_type
)
{
switch
(
codec
->
codec_type
)
{
case
AVMEDIA_TYPE_AUDIO
:
case
AVMEDIA_TYPE_AUDIO
:
ost
->
fifo
=
av_fifo_alloc
(
1024
);
ost
->
fifo
=
av_fifo_alloc
(
1024
);
if
(
!
ost
->
fifo
)
if
(
!
ost
->
fifo
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
goto
fail
;
}
ost
->
reformat_pair
=
MAKE_SFMT_PAIR
(
AV_SAMPLE_FMT_NONE
,
AV_SAMPLE_FMT_NONE
);
ost
->
reformat_pair
=
MAKE_SFMT_PAIR
(
AV_SAMPLE_FMT_NONE
,
AV_SAMPLE_FMT_NONE
);
if
(
!
codec
->
sample_rate
)
{
if
(
!
codec
->
sample_rate
)
{
codec
->
sample_rate
=
icodec
->
sample_rate
;
codec
->
sample_rate
=
icodec
->
sample_rate
;
...
...
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