aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-06 03:51:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-06 03:51:46 +0200
commitf87b3d552394cd03c1e9f180553d41600c575c69 (patch)
treeaaef65579b9b5d2c0e0a931c13612d02826d086b /libavcodec
parent59c1023ef544c215e5d4c6c0276f04230beb6fd8 (diff)
downloadffmpeg-f87b3d552394cd03c1e9f180553d41600c575c69.tar.gz
avcodec/pthread_frame: fix missing unlock on error
Fixes CID1197057 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread_frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 4e385e7136..addcecc70f 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -356,8 +356,10 @@ 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)
+ if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0) {
+ pthread_mutex_unlock(&p->mutex);
return ret;
+ }
p->state = STATE_SETTING_UP;
pthread_cond_signal(&p->input_cond);