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
6eee9f55
Commit
6eee9f55
authored
Jul 31, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8svx: ensure that packet size is multiple of channels.
Fix an assert failure with packets of invalid size.
parent
d1ebb25a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
8svx.c
libavcodec/8svx.c
+8
-1
No files found.
libavcodec/8svx.c
View file @
6eee9f55
...
...
@@ -112,9 +112,16 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* decode and interleave the first packet */
if
(
!
esc
->
samples
&&
avpkt
)
{
uint8_t
*
deinterleaved_samples
,
*
p
=
NULL
;
int
packet_size
=
avpkt
->
size
;
if
(
packet_size
%
avctx
->
channels
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Packet with odd size, ignoring last byte
\n
"
);
if
(
packet_size
<
avctx
->
channels
)
return
packet_size
;
packet_size
-=
packet_size
%
avctx
->
channels
;
}
esc
->
samples_size
=
!
esc
->
table
?
avpkt
->
size
:
avctx
->
channels
+
(
avpkt
->
size
-
avctx
->
channels
)
*
2
;
packet_size
:
avctx
->
channels
+
(
packet_
size
-
avctx
->
channels
)
*
2
;
if
(
!
(
esc
->
samples
=
av_malloc
(
esc
->
samples_size
)))
return
AVERROR
(
ENOMEM
);
...
...
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