Skip to content

Commit

Permalink
Fixed minor leak in examples/util
Browse files Browse the repository at this point in the history
Fixed minor pipeline/element memory leak in examples/util
  • Loading branch information
rob-deutsch committed Feb 10, 2019
1 parent 434af9e commit 72c5160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/util/gstreamer-sink/gst.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ void gstreamer_receive_push_buffer(GstElement *pipeline, void *buffer, int len)
gpointer p = g_memdup(buffer, len);
GstBuffer *buffer = gst_buffer_new_wrapped(p, len);
gst_app_src_push_buffer(GST_APP_SRC(src), buffer);
gst_object_unref(src);
}
}
1 change: 1 addition & 0 deletions examples/util/gstreamer-src/gst.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void gstreamer_send_start_pipeline(GstElement *pipeline, int pipelineId) {
GstElement *appsink = gst_bin_get_by_name(GST_BIN(pipeline), "appsink");
g_object_set(appsink, "emit-signals", TRUE, NULL);
g_signal_connect(appsink, "new-sample", G_CALLBACK(gstreamer_send_new_sample_handler), s);
gst_object_unref(appsink);

gst_element_set_state(pipeline, GST_STATE_PLAYING);
}
Expand Down

0 comments on commit 72c5160

Please sign in to comment.