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
60b099c3
Commit
60b099c3
authored
Nov 27, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_audio_buffer: fix usage where channels are not set but layout is
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
02abc905
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
frame.c
libavutil/frame.c
+8
-2
No files found.
libavutil/frame.c
View file @
60b099c3
...
...
@@ -183,11 +183,17 @@ fail:
static
int
get_audio_buffer
(
AVFrame
*
frame
,
int
align
)
{
int
channels
=
frame
->
channels
;
int
channels
;
int
planar
=
av_sample_fmt_is_planar
(
frame
->
format
);
int
planes
=
planar
?
channels
:
1
;
int
planes
;
int
ret
,
i
;
if
(
!
frame
->
channels
)
frame
->
channels
=
av_get_channel_layout_nb_channels
(
frame
->
channel_layout
);
channels
=
frame
->
channels
;
planes
=
planar
?
channels
:
1
;
CHECK_CHANNELS_CONSISTENCY
(
frame
);
if
(
!
frame
->
linesize
[
0
])
{
ret
=
av_samples_get_buffer_size
(
&
frame
->
linesize
[
0
],
channels
,
...
...
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