[FFmpeg-cvslog] avcodec/pthread_frame: fix missing unlock on error
Michael Niedermayer
git at videolan.org
Sun Apr 6 06:18:15 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 6 03:51:46 2014 +0200| [f87b3d552394cd03c1e9f180553d41600c575c69] | committer: Michael Niedermayer
avcodec/pthread_frame: fix missing unlock on error
Fixes CID1197057
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f87b3d552394cd03c1e9f180553d41600c575c69
---
libavcodec/pthread_frame.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 4e385e7..addcecc 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);
More information about the ffmpeg-cvslog
mailing list