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
1e5cfad5
Commit
1e5cfad5
authored
Feb 05, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/pthread_frame: Check av_packet_ref() for failure
Fixes CID1396242
parent
e57fd926
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
pthread_frame.c
libavcodec/pthread_frame.c
+7
-1
No files found.
libavcodec/pthread_frame.c
View file @
1e5cfad5
...
...
@@ -312,6 +312,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
&
AV_CODEC_CAP_DELAY
))
return
0
;
...
...
@@ -337,7 +338,12 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
}
av_packet_unref
(
&
p
->
avpkt
);
av_packet_ref
(
&
p
->
avpkt
,
avpkt
);
ret
=
av_packet_ref
(
&
p
->
avpkt
,
avpkt
);
if
(
ret
<
0
)
{
pthread_mutex_unlock
(
&
p
->
mutex
);
av_log
(
p
->
avctx
,
AV_LOG_ERROR
,
"av_packet_ref() failed in submit_packet()
\n
"
);
return
ret
;
}
p
->
state
=
STATE_SETTING_UP
;
pthread_cond_signal
(
&
p
->
input_cond
);
...
...
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