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
d4e82a34
Commit
d4e82a34
authored
Oct 02, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8svx: remove malloc and memcpy that have become unneeded
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8f0168a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
8svx.c
libavcodec/8svx.c
+2
-9
No files found.
libavcodec/8svx.c
View file @
d4e82a34
...
...
@@ -94,7 +94,6 @@ 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
)
{
...
...
@@ -119,23 +118,17 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
av_log
(
avctx
,
AV_LOG_ERROR
,
"packet size is too small
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
!
(
deinterleaved_samples
=
av_mallocz
(
n
)))
return
AVERROR
(
ENOMEM
);
dst
=
p
=
deinterleaved_samples
;
/* the uncompressed starting value is contained in the first byte */
dst
=
deinterleaved_
samples
;
dst
=
esc
->
samples
;
for
(
i
=
0
;
i
<
avctx
->
channels
;
i
++
)
{
delta_decode
(
dst
,
buf
+
1
,
buf_size
/
avctx
->
channels
-
1
,
buf
[
0
],
esc
->
table
);
buf
+=
buf_size
/
avctx
->
channels
;
dst
+=
n
/
avctx
->
channels
-
1
;
}
}
else
{
deinterleaved_samples
=
avpkt
->
data
;
memcpy
(
esc
->
samples
,
avpkt
->
data
,
esc
->
samples_size
)
;
}
memcpy
(
esc
->
samples
,
deinterleaved_samples
,
esc
->
samples_size
);
av_freep
(
&
p
);
}
/* get output buffer */
...
...
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