chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disobedience/disobedience.h: Declare variables as `extern'.
[disorder]
/
server
/
gstdecode.c
diff --git
a/server/gstdecode.c
b/server/gstdecode.c
index ac2884d8d9f60e1ed5298210de168e05e36cdc6a..6a288bc2ce79e3875da9a3b3981a84b998c5b43e 100644
(file)
--- a/
server/gstdecode.c
+++ b/
server/gstdecode.c
@@
-35,11
+35,13
@@
#include <gst/app/gstappsink.h>
#include <gst/audio/audio.h>
#include <gst/app/gstappsink.h>
#include <gst/audio/audio.h>
-/* The only application we have for `attribute' is declaring function
+/* The only application
s
we have for `attribute' is declaring function
* arguments as being unused, because we have a lot of callback functions
* arguments as being unused, because we have a lot of callback functions
- * which are meant to comply with an externally defined interface.
+ * which are meant to comply with an externally defined interface; and
+ * marking `help' as not returning.
*/
#ifdef __GNUC__
*/
#ifdef __GNUC__
+# define NORETURN __attribute__((noreturn))
# define UNUSED __attribute__((unused))
#endif
# define UNUSED __attribute__((unused))
#endif
@@
-477,7
+479,7
@@
static void decode(void)
gst_app_sink_set_callbacks(appsink, &callbacks, 0, 0);
/* Set the ball rolling. */
gst_app_sink_set_callbacks(appsink, &callbacks, 0, 0);
/* Set the ball rolling. */
- gst_element_set_state(
GST_ELEMENT(pipeline)
, GST_STATE_PLAYING);
+ gst_element_set_state(
pipeline
, GST_STATE_PLAYING);
/* And wait for the miracle to come. */
g_main_loop_run(loop);
/* And wait for the miracle to come. */
g_main_loop_run(loop);
@@
-485,7
+487,7
@@
static void decode(void)
/* Shut down the pipeline. This isn't strictly necessary, since we're
* about to exit very soon, but it's kind of polite.
*/
/* Shut down the pipeline. This isn't strictly necessary, since we're
* about to exit very soon, but it's kind of polite.
*/
- gst_element_set_state(
GST_ELEMENT(pipeline)
, GST_STATE_NULL);
+ gst_element_set_state(
pipeline
, GST_STATE_NULL);
}
static int getenum(const char *what, const char *s, const char *const *tags)
}
static int getenum(const char *what, const char *s, const char *const *tags)
@@
-533,7
+535,7
@@
static const struct option options[] = {
{ 0, 0, 0, 0 }
};
{ 0, 0, 0, 0 }
};
-static void help(void)
+static void
NORETURN
help(void)
{
xprintf("Usage:\n"
" disorder-gstdecode [OPTIONS] PATH\n"
{
xprintf("Usage:\n"
" disorder-gstdecode [OPTIONS] PATH\n"
@@
-584,6
+586,7
@@
int main(int argc, char *argv[])
if(optind >= argc) disorder_fatal(0, "missing filename");
file = argv[optind++];
if(optind < argc) disorder_fatal(0, "excess arguments");
if(optind >= argc) disorder_fatal(0, "missing filename");
file = argv[optind++];
if(optind < argc) disorder_fatal(0, "excess arguments");
+ config_per_user = 0;
if(config_read(1, 0)) disorder_fatal(0, "cannot read configuration");
/* Set up the GStreamer machinery. */
if(config_read(1, 0)) disorder_fatal(0, "cannot read configuration");
/* Set up the GStreamer machinery. */