mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/pthread_frame: fix missing unlock on error
Fixes CID1197057 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
59c1023ef5
commit
f87b3d5523
|
@ -356,8 +356,10 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
|
||||||
memcpy(p->buf, avpkt->data, avpkt->size);
|
memcpy(p->buf, avpkt->data, avpkt->size);
|
||||||
memset(p->buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_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;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
p->state = STATE_SETTING_UP;
|
p->state = STATE_SETTING_UP;
|
||||||
pthread_cond_signal(&p->input_cond);
|
pthread_cond_signal(&p->input_cond);
|
||||||
|
|
Loading…
Reference in New Issue