mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Better to unlock after the free and zero.
This commit is contained in:
parent
5b35e70b94
commit
238224efc8
4
codec.c
4
codec.c
@ -515,8 +515,8 @@ void CodecVideoClose(VideoDecoder * video_decoder)
|
|||||||
if (video_decoder->VideoCtx) {
|
if (video_decoder->VideoCtx) {
|
||||||
pthread_mutex_lock(&CodecLockMutex);
|
pthread_mutex_lock(&CodecLockMutex);
|
||||||
avcodec_close(video_decoder->VideoCtx);
|
avcodec_close(video_decoder->VideoCtx);
|
||||||
pthread_mutex_unlock(&CodecLockMutex);
|
|
||||||
av_freep(&video_decoder->VideoCtx);
|
av_freep(&video_decoder->VideoCtx);
|
||||||
|
pthread_mutex_unlock(&CodecLockMutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -856,8 +856,8 @@ void CodecAudioClose(AudioDecoder * audio_decoder)
|
|||||||
if (audio_decoder->AudioCtx) {
|
if (audio_decoder->AudioCtx) {
|
||||||
pthread_mutex_lock(&CodecLockMutex);
|
pthread_mutex_lock(&CodecLockMutex);
|
||||||
avcodec_close(audio_decoder->AudioCtx);
|
avcodec_close(audio_decoder->AudioCtx);
|
||||||
pthread_mutex_unlock(&CodecLockMutex);
|
|
||||||
av_freep(&audio_decoder->AudioCtx);
|
av_freep(&audio_decoder->AudioCtx);
|
||||||
|
pthread_mutex_unlock(&CodecLockMutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user