mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
examples: overlaycomposition: Fix implicit declaration warning
overlaycomposition.c:276:5: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] overlaycomposition.c(263): warning C4090: 'initializing': different 'const' qualifiers
This commit is contained in:
parent
90bcaf5a43
commit
c8ff6f82a5
1 changed files with 7 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define VIDEO_WIDTH 720
|
||||
#define VIDEO_HEIGHT 480
|
||||
|
@ -256,7 +257,7 @@ main (int argc, char **argv)
|
|||
OverlayState overlay_state = { 0, };
|
||||
GOptionContext *option_ctx;
|
||||
GError *error = NULL;
|
||||
const gchar *video_sink = "autovideosink";
|
||||
gchar *video_sink = NULL;
|
||||
gboolean ret;
|
||||
GOptionEntry options[] = {
|
||||
{"videosink", 0, 0, G_OPTION_ARG_STRING, &video_sink,
|
||||
|
@ -281,7 +282,12 @@ main (int argc, char **argv)
|
|||
capsfilter = gst_element_factory_make ("capsfilter", NULL);
|
||||
overlay = gst_element_factory_make ("overlaycomposition", NULL);
|
||||
conv = gst_element_factory_make ("videoconvert", NULL);
|
||||
|
||||
if (!video_sink)
|
||||
video_sink = g_strdup ("autovideosink");
|
||||
|
||||
sink = gst_element_factory_make (video_sink, NULL);
|
||||
g_free (video_sink);
|
||||
|
||||
if (!pipeline || !src || !capsfilter || !overlay || !conv || !sink) {
|
||||
g_error ("Failed to create elements");
|
||||
|
|
Loading…
Reference in a new issue