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
ea6825fd
Commit
ea6825fd
authored
Feb 20, 2014
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/pthread: copy packet side data.
parent
742d8601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
pthread_frame.c
libavcodec/pthread_frame.c
+5
-0
No files found.
libavcodec/pthread_frame.c
View file @
ea6825fd
...
...
@@ -317,6 +317,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
FrameThreadContext
*
fctx
=
p
->
parent
;
PerThreadContext
*
prev_thread
=
fctx
->
prev_thread
;
const
AVCodec
*
codec
=
p
->
avctx
->
codec
;
int
ret
;
if
(
!
avpkt
->
size
&&
!
(
codec
->
capabilities
&
CODEC_CAP_DELAY
))
return
0
;
...
...
@@ -340,6 +341,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
}
}
av_packet_free_side_data
(
&
p
->
avpkt
);
av_buffer_unref
(
&
p
->
avpkt
.
buf
);
p
->
avpkt
=
*
avpkt
;
if
(
avpkt
->
buf
)
...
...
@@ -354,6 +356,8 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
memcpy
(
p
->
buf
,
avpkt
->
data
,
avpkt
->
size
);
memset
(
p
->
buf
+
avpkt
->
size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
}
if
((
ret
=
av_copy_packet_side_data
(
&
p
->
avpkt
,
avpkt
))
<
0
)
return
ret
;
p
->
state
=
STATE_SETTING_UP
;
pthread_cond_signal
(
&
p
->
input_cond
);
...
...
@@ -592,6 +596,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
pthread_cond_destroy
(
&
p
->
input_cond
);
pthread_cond_destroy
(
&
p
->
progress_cond
);
pthread_cond_destroy
(
&
p
->
output_cond
);
av_packet_free_side_data
(
&
p
->
avpkt
);
av_buffer_unref
(
&
p
->
avpkt
.
buf
);
av_freep
(
&
p
->
buf
);
av_freep
(
&
p
->
released_buffers
);
...
...
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