summaryrefslogtreecommitdiff
path: root/codec.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2013-04-10 15:04:09 +0200
committerJohns <johns98@gmx.net>2013-04-10 15:04:09 +0200
commit238224efc84ab2eb66f7328c19c3f815626c50aa (patch)
tree710b68335e9fa7edaac6063bd7ab1241a62b8f75 /codec.c
parent5b35e70b94b52063ad8b90e602fd10ee12a2786a (diff)
downloadvdr-plugin-softhddevice-238224efc84ab2eb66f7328c19c3f815626c50aa.tar.gz
vdr-plugin-softhddevice-238224efc84ab2eb66f7328c19c3f815626c50aa.tar.bz2
Better to unlock after the free and zero.
Diffstat (limited to 'codec.c')
-rw-r--r--codec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/codec.c b/codec.c
index 6e1e942..40c6cbf 100644
--- a/codec.c
+++ b/codec.c
@@ -515,8 +515,8 @@ void CodecVideoClose(VideoDecoder * video_decoder)
if (video_decoder->VideoCtx) {
pthread_mutex_lock(&CodecLockMutex);
avcodec_close(video_decoder->VideoCtx);
- pthread_mutex_unlock(&CodecLockMutex);
av_freep(&video_decoder->VideoCtx);
+ pthread_mutex_unlock(&CodecLockMutex);
}
}
@@ -856,8 +856,8 @@ void CodecAudioClose(AudioDecoder * audio_decoder)
if (audio_decoder->AudioCtx) {
pthread_mutex_lock(&CodecLockMutex);
avcodec_close(audio_decoder->AudioCtx);
- pthread_mutex_unlock(&CodecLockMutex);
av_freep(&audio_decoder->AudioCtx);
+ pthread_mutex_unlock(&CodecLockMutex);
}
}