the sink element, unblock the source pads and set the pipeline to
the playing state. You will see that exactly the requested
region is played by the sink before it goes to EOS.
- What follows
</para>
<para>
What follows is an example application that loosly follows this
if (error != NULL) {
g_print ("could not construct pipeline: %s\n", error->message);
- g_error_free (error);
+ g_clear_error (&error);
exit (-1);
}
gst_message_parse_error (msg, &err, &dbg);
gst_object_default_error (msg->src, err, dbg);
- g_error_free (err);
+ g_clear_error (&err);
g_free (dbg);
g_main_loop_quit (loop);
break;
g_option_context_add_group (ctx, gst_init_get_option_group ());
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
g_print ("Error initializing: %s\n", err->message);
+ g_clear_error (&err);
+ g_option_context_free (ctx);
return 1;
}
g_option_context_free (ctx);