srt: initialize list access within locked region
authorMark Nauwelaerts <mnauw@users.sourceforge.net>
Wed, 1 May 2019 16:58:30 +0000 (18:58 +0200)
committerMark Nauwelaerts <mnauw@users.sourceforge.net>
Sat, 11 May 2019 22:38:46 +0000 (22:38 +0000)
ext/srt/gstsrtobject.c

index aadcfb59aa2d03f8de7a2b344ada5731fd901011..5baaa9b874dfd60fa6726edd2a9c34b7ff580842 100644 (file)
@@ -1292,9 +1292,10 @@ gst_srt_object_write_to_callers (GstSRTObject * srtobject,
     GstBufferList * headers,
     const GstMapInfo * mapinfo, GCancellable * cancellable, GError ** error)
 {
-  GList *callers = srtobject->callers;
+  GList *callers;
 
   GST_OBJECT_LOCK (srtobject->element);
+  callers = srtobject->callers;
   while (callers != NULL) {
     gssize len = 0;
     const guint8 *msg = mapinfo->data;