Revision 03de31e0 output-grapes.c

View differences:

output-grapes.c
35 35

  
36 36
void output_init(int bufsize, const char *config)
37 37
{
38
  char cfg[256];
39

  
40
  if (config && (strlen(config) > 4) && (memcmp(config, "udp:", 4) == 0)) {
41
    config += 4;
42
    sprintf(cfg, "dechunkiser=udp");
43
    sprintf(cfg + strlen(cfg), ",%s", config);
44
  } else if (config && (strlen(config) >= 6) && (memcmp(config, "dummy:", 6) == 0)) {
45
    config += 6;
46
    sprintf(cfg, "dechunkiser=dummy,type=stats");
47
    sprintf(cfg + strlen(cfg), ",%s", config);
48
  } else {
49
    sprintf(cfg, "dechunkiser=avf,media=v");
38
  char *c;
39

  
40
  c = strchr(config,',');
41
  if (c) {
42
    *(c++) = 0;
50 43
  }
51
  out = out_stream_init(config, cfg);
44
  out = out_stream_init(config, c);
52 45
  if (out == NULL) {
53 46
     fprintf(stderr, "Error: can't initialize output module\n");
54 47
     exit(1);

Also available in: Unified diff