mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
tests: fix leak in videoframe-audiolevel test
also add braces for the else case https://bugzilla.gnome.org/show_bug.cgi?id=781022
This commit is contained in:
parent
3fd5608e21
commit
b817f16e19
1 changed files with 6 additions and 3 deletions
|
@ -299,17 +299,20 @@ on_message (GstBus * bus, GstMessage * message, gpointer user_data)
|
|||
gdouble rms;
|
||||
gint channels2;
|
||||
guint i;
|
||||
GstClockTime *rtime = g_new (GstClockTime, 1);
|
||||
GstClockTime *rtime;
|
||||
|
||||
if (message->type != GST_MESSAGE_ELEMENT
|
||||
|| strcmp (name, "videoframe-audiolevel") != 0)
|
||||
goto done;
|
||||
|
||||
num_msgs++;
|
||||
if (!gst_structure_get_clock_time (s, "running-time", rtime))
|
||||
rtime = g_new (GstClockTime, 1);
|
||||
if (!gst_structure_get_clock_time (s, "running-time", rtime)) {
|
||||
g_warning ("Could not parse running time");
|
||||
else
|
||||
g_free (rtime);
|
||||
} else {
|
||||
g_queue_push_tail (&msg_timestamp_q, rtime);
|
||||
}
|
||||
|
||||
/* the values are packed into GValueArrays with the value per channel */
|
||||
array_val = gst_structure_get_value (s, "rms");
|
||||
|
|
Loading…
Reference in a new issue