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
9684d7f1
Commit
9684d7f1
authored
Jun 03, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpack: frame multi-threading support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
495db0e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
wavpack.c
libavcodec/wavpack.c
+4
-2
No files found.
libavcodec/wavpack.c
View file @
9684d7f1
...
...
@@ -25,6 +25,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "thread.h"
#include "unary.h"
#include "bytestream.h"
...
...
@@ -754,6 +755,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
AVFrame
*
frame
,
const
uint8_t
*
buf
,
int
buf_size
)
{
WavpackContext
*
wc
=
avctx
->
priv_data
;
ThreadFrame
tframe
=
{
.
f
=
frame
};
WavpackFrameContext
*
s
;
GetByteContext
gb
;
void
*
samples_l
,
*
samples_r
;
...
...
@@ -1120,7 +1122,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
/* get output buffer */
frame
->
nb_samples
=
s
->
samples
+
1
;
if
((
ret
=
ff_
get_buffer
(
avctx
,
frame
,
0
))
<
0
)
if
((
ret
=
ff_
thread_get_buffer
(
avctx
,
&
t
frame
,
0
))
<
0
)
return
ret
;
frame
->
nb_samples
=
s
->
samples
;
}
...
...
@@ -1236,6 +1238,6 @@ AVCodec ff_wavpack_decoder = {
.
close
=
wavpack_decode_end
,
.
decode
=
wavpack_decode_frame
,
.
flush
=
wavpack_decode_flush
,
.
capabilities
=
CODEC_CAP_DR1
,
.
capabilities
=
CODEC_CAP_DR1
|
CODEC_CAP_FRAME_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"WavPack"
),
};
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