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
ff0bdf93
Commit
ff0bdf93
authored
Jun 13, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: copy AVCodecContext for threads
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
c112e36d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
1 deletion
+20
-1
alac.c
libavcodec/alac.c
+1
-0
flacdec.c
libavcodec/flacdec.c
+1
-1
takdec.c
libavcodec/takdec.c
+8
-0
tta.c
libavcodec/tta.c
+2
-0
wavpack.c
libavcodec/wavpack.c
+8
-0
No files found.
libavcodec/alac.c
View file @
ff0bdf93
...
...
@@ -621,6 +621,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
static
int
init_thread_copy
(
AVCodecContext
*
avctx
)
{
ALACContext
*
alac
=
avctx
->
priv_data
;
alac
->
avctx
=
avctx
;
return
allocate_buffers
(
alac
);
}
...
...
libavcodec/flacdec.c
View file @
ff0bdf93
...
...
@@ -498,7 +498,6 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
int
ret
;
*
got_frame_ptr
=
0
;
s
->
avctx
=
avctx
;
if
(
s
->
max_framesize
==
0
)
{
s
->
max_framesize
=
...
...
@@ -575,6 +574,7 @@ static int init_thread_copy(AVCodecContext *avctx)
FLACContext
*
s
=
avctx
->
priv_data
;
s
->
decoded_buffer
=
NULL
;
s
->
decoded_buffer_size
=
0
;
s
->
avctx
=
avctx
;
if
(
s
->
max_blocksize
)
return
allocate_buffers
(
s
);
return
0
;
...
...
libavcodec/takdec.c
View file @
ff0bdf93
...
...
@@ -902,6 +902,13 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
return
pkt
->
size
;
}
static
int
init_thread_copy
(
AVCodecContext
*
avctx
)
{
TAKDecContext
*
s
=
avctx
->
priv_data
;
s
->
avctx
=
avctx
;
return
0
;
}
static
int
update_thread_context
(
AVCodecContext
*
dst
,
const
AVCodecContext
*
src
)
{
...
...
@@ -931,6 +938,7 @@ AVCodec ff_tak_decoder = {
.
init
=
tak_decode_init
,
.
close
=
tak_decode_close
,
.
decode
=
tak_decode_frame
,
.
init_thread_copy
=
ONLY_IF_THREADS_ENABLED
(
init_thread_copy
),
.
update_thread_context
=
ONLY_IF_THREADS_ENABLED
(
update_thread_context
),
.
capabilities
=
CODEC_CAP_DR1
|
CODEC_CAP_FRAME_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"TAK (Tom's lossless Audio Kompressor)"
),
...
...
libavcodec/tta.c
View file @
ff0bdf93
...
...
@@ -410,6 +410,8 @@ error:
static
int
init_thread_copy
(
AVCodecContext
*
avctx
)
{
TTAContext
*
s
=
avctx
->
priv_data
;
s
->
avctx
=
avctx
;
return
allocate_buffers
(
avctx
);
}
...
...
libavcodec/wavpack.c
View file @
ff0bdf93
...
...
@@ -728,6 +728,13 @@ static av_cold int wv_alloc_frame_context(WavpackContext *c)
return
0
;
}
static
int
init_thread_copy
(
AVCodecContext
*
avctx
)
{
WavpackContext
*
s
=
avctx
->
priv_data
;
s
->
avctx
=
avctx
;
return
0
;
}
static
av_cold
int
wavpack_decode_init
(
AVCodecContext
*
avctx
)
{
WavpackContext
*
s
=
avctx
->
priv_data
;
...
...
@@ -1238,6 +1245,7 @@ AVCodec ff_wavpack_decoder = {
.
close
=
wavpack_decode_end
,
.
decode
=
wavpack_decode_frame
,
.
flush
=
wavpack_decode_flush
,
.
init_thread_copy
=
ONLY_IF_THREADS_ENABLED
(
init_thread_copy
),
.
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