Revision 4272d37c input-grapes.c

View differences:

input-grapes.c
29 29
{
30 30
  struct input_desc *res;
31 31
  struct timeval tv;
32
  char cfg[256];
32 33

  
33 34
  res = malloc(sizeof(struct input_desc));
34 35
  if (res == NULL) {
35 36
    return NULL;
36 37
  }
37
  res->s = input_stream_open(fname, &res->interframe, "media=av");
38
  sprintf(cfg, "media=av");
39
  if (flags & INPUT_LOOP) {
40
    sprintf(cfg + strlen(cfg), ",loop=1");
41
  }
42
  res->s = input_stream_open(fname, &res->interframe, cfg);
38 43
  if (res->s == NULL) {
39 44
    free(res);
40 45
    res = NULL;

Also available in: Unified diff