av: use GMutex instead of deprecated GStaticMutex
authorAurélien Zanelli <aurelien.zanelli@darkosphere.fr>
Thu, 27 Nov 2014 19:44:31 +0000 (20:44 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 28 Nov 2014 00:32:28 +0000 (00:32 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=740822

ext/libav/gstav.c

index 7884a51..2321a4c 100644 (file)
@@ -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;
 }