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
5c210e2c
Commit
5c210e2c
authored
Nov 04, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten: do not modify samples pointer when interleaving
parent
befc473c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
shorten.c
libavcodec/shorten.c
+4
-3
No files found.
libavcodec/shorten.c
View file @
5c210e2c
...
@@ -252,12 +252,13 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
...
@@ -252,12 +252,13 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
return
0
;
return
0
;
}
}
static
int16_t
*
interleave_buffer
(
int16_t
*
samples
,
int
nchan
,
int
blocksize
,
int32_t
**
buffer
)
{
static
void
interleave_buffer
(
int16_t
*
samples
,
int
nchan
,
int
blocksize
,
int32_t
**
buffer
)
{
int
i
,
chan
;
int
i
,
chan
;
for
(
i
=
0
;
i
<
blocksize
;
i
++
)
for
(
i
=
0
;
i
<
blocksize
;
i
++
)
for
(
chan
=
0
;
chan
<
nchan
;
chan
++
)
for
(
chan
=
0
;
chan
<
nchan
;
chan
++
)
*
samples
++
=
av_clip_int16
(
buffer
[
chan
][
i
]);
*
samples
++
=
av_clip_int16
(
buffer
[
chan
][
i
]);
return
samples
;
}
}
static
const
int
fixed_coeffs
[
3
][
3
]
=
{
static
const
int
fixed_coeffs
[
3
][
3
]
=
{
...
@@ -576,7 +577,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
...
@@ -576,7 +577,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Output buffer is too small
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Output buffer is too small
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
samples
=
interleave_buffer
(
samples
,
s
->
channels
,
s
->
blocksize
,
s
->
decoded
);
interleave_buffer
(
samples
,
s
->
channels
,
s
->
blocksize
,
s
->
decoded
);
*
data_size
=
out_size
;
*
data_size
=
out_size
;
}
}
}
}
...
...
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