summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@darkosphere.fr>2014-11-27 20:44:31 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-11-28 00:32:28 +0000
commit728444168acce4310645f173a74034a7ac1c1732 (patch)
tree3ffb684259d3b040d6a2e530e1886a5077ad428c
parent70462960d43765439f31ec9f0579d080834ece18 (diff)
av: use GMutex instead of deprecated GStaticMutex
https://bugzilla.gnome.org/show_bug.cgi?id=740822
-rw-r--r--ext/libav/gstav.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c
index 7884a51..2321a4c 100644
--- a/ext/libav/gstav.c
+++ b/ext/libav/gstav.c
@@ -36,7 +36,7 @@
GST_DEBUG_CATEGORY (ffmpeg_debug);
-static GStaticMutex gst_avcodec_mutex = G_STATIC_MUTEX_INIT;
+static GMutex gst_avcodec_mutex;
int
@@ -44,9 +44,9 @@ gst_ffmpeg_avcodec_open (AVCodecContext * avctx, AVCodec * codec)
{
int ret;
- g_static_mutex_lock (&gst_avcodec_mutex);
+ g_mutex_lock (&gst_avcodec_mutex);
ret = avcodec_open2 (avctx, codec, NULL);
- g_static_mutex_unlock (&gst_avcodec_mutex);
+ g_mutex_unlock (&gst_avcodec_mutex);
return ret;
}
@@ -56,9 +56,9 @@ gst_ffmpeg_avcodec_close (AVCodecContext * avctx)
{
int ret;
- g_static_mutex_lock (&gst_avcodec_mutex);
+ g_mutex_lock (&gst_avcodec_mutex);
ret = avcodec_close (avctx);
- g_static_mutex_unlock (&gst_avcodec_mutex);
+ g_mutex_unlock (&gst_avcodec_mutex);
return ret;
}
@@ -68,9 +68,9 @@ gst_ffmpeg_av_find_stream_info (AVFormatContext * ic)
{
int ret;
- g_static_mutex_lock (&gst_avcodec_mutex);
+ g_mutex_lock (&gst_avcodec_mutex);
ret = avformat_find_stream_info (ic, NULL);
- g_static_mutex_unlock (&gst_avcodec_mutex);
+ g_mutex_unlock (&gst_avcodec_mutex);
return ret;
}