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
37fa4b9b
Commit
37fa4b9b
authored
May 11, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/audiointerleave: return more meaningful error codes
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki2@gmail.com
>
parent
2ed9e17e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
audiointerleave.c
libavformat/audiointerleave.c
+4
-4
No files found.
libavformat/audiointerleave.c
View file @
37fa4b9b
...
...
@@ -45,11 +45,11 @@ int ff_audio_interleave_init(AVFormatContext *s,
int
i
;
if
(
!
samples_per_frame
)
return
-
1
;
return
AVERROR
(
EINVAL
)
;
if
(
!
time_base
.
num
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"timebase not set for audio interleave
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
...
...
@@ -60,7 +60,7 @@ int ff_audio_interleave_init(AVFormatContext *s,
av_get_bits_per_sample
(
st
->
codec
->
codec_id
))
/
8
;
if
(
!
aic
->
sample_size
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"could not compute sample size
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
aic
->
samples_per_frame
=
samples_per_frame
;
aic
->
samples
=
aic
->
samples_per_frame
;
...
...
@@ -114,7 +114,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
unsigned
new_size
=
av_fifo_size
(
aic
->
fifo
)
+
pkt
->
size
;
if
(
new_size
>
aic
->
fifo_size
)
{
if
(
av_fifo_realloc2
(
aic
->
fifo
,
new_size
)
<
0
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
aic
->
fifo_size
=
new_size
;
}
av_fifo_generic_write
(
aic
->
fifo
,
pkt
->
data
,
pkt
->
size
,
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