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
031be5b4
Commit
031be5b4
authored
Jul 11, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3dec: Consistently use AC3_BLOCK_SIZE and sizeof
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
68e57cde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ac3dec.c
libavcodec/ac3dec.c
+3
-3
No files found.
libavcodec/ac3dec.c
View file @
031be5b4
...
...
@@ -1370,7 +1370,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
avctx
->
audio_service_type
=
AV_AUDIO_SERVICE_TYPE_KARAOKE
;
/* get output buffer */
frame
->
nb_samples
=
s
->
num_blocks
*
256
;
frame
->
nb_samples
=
s
->
num_blocks
*
AC3_BLOCK_SIZE
;
if
((
ret
=
ff_get_buffer
(
avctx
,
frame
,
0
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
ret
;
...
...
@@ -1392,7 +1392,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
}
if
(
err
)
for
(
ch
=
0
;
ch
<
s
->
out_channels
;
ch
++
)
memcpy
(
s
->
outptr
[
channel_map
[
ch
]],
output
[
ch
],
1024
);
memcpy
(
s
->
outptr
[
channel_map
[
ch
]],
output
[
ch
],
sizeof
(
**
output
)
*
AC3_BLOCK_SIZE
);
for
(
ch
=
0
;
ch
<
s
->
out_channels
;
ch
++
)
output
[
ch
]
=
s
->
outptr
[
channel_map
[
ch
]];
for
(
ch
=
0
;
ch
<
s
->
channels
;
ch
++
)
...
...
@@ -1401,7 +1401,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
/* keep last block for error concealment in next frame */
for
(
ch
=
0
;
ch
<
s
->
out_channels
;
ch
++
)
memcpy
(
s
->
output
[
ch
],
output
[
ch
],
1024
);
memcpy
(
s
->
output
[
ch
],
output
[
ch
],
sizeof
(
**
output
)
*
AC3_BLOCK_SIZE
);
*
got_frame_ptr
=
1
;
...
...
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