Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
48b24bd2
Commit
48b24bd2
authored
Nov 23, 2013
by
Tim Walker
Committed by
Diego Biurrun
Nov 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3dec: Fix out-of-array read
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
f187557a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ac3dec.c
libavcodec/ac3dec.c
+3
-2
No files found.
libavcodec/ac3dec.c
View file @
48b24bd2
...
...
@@ -1367,8 +1367,6 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
s
->
out_channels
=
2
;
s
->
output_mode
=
AC3_CHMODE_STEREO
;
}
avctx
->
channels
=
s
->
out_channels
;
avctx
->
channel_layout
=
avpriv_ac3_channel_layout_tab
[
s
->
output_mode
];
/* set downmixing coefficients if needed */
if
(
s
->
channels
!=
s
->
out_channels
&&
!
((
s
->
output_mode
&
AC3_OUTPUT_LFEON
)
&&
...
...
@@ -1380,6 +1378,9 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
return
AVERROR_INVALIDDATA
;
}
avctx
->
channels
=
s
->
out_channels
;
avctx
->
channel_layout
=
avpriv_ac3_channel_layout_tab
[
s
->
output_mode
&
~
AC3_OUTPUT_LFEON
];
if
(
s
->
output_mode
&
AC3_OUTPUT_LFEON
)
avctx
->
channel_layout
|=
AV_CH_LOW_FREQUENCY
;
/* set audio service type based on bitstream mode for AC-3 */
avctx
->
audio_service_type
=
s
->
bitstream_mode
;
...
...
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