Revision a2fa286f input-grapes.c

View differences:

input-grapes.c
17 17
#include "input.h"
18 18
#include "dbg.h"
19 19

  
20
extern int initial_id;
21

  
20 22
struct input_desc {
21 23
  struct input_stream *s;
22 24
  int id;
......
71 73
    res->start_time = tv.tv_usec + tv.tv_sec * 1000000ULL;
72 74
    res->first_ts = 0;
73 75
    res->id = 0; //(res->start_time / res->interframe) % INT_MAX; //TODO: verify 32/64 bit
76

  
77
    if(initial_id == -1) {
78
      res->id = (res->start_time / res->interframe) % INT_MAX; //TODO: verify 32/64 bit
79
    } else {
80
      res->id = initial_id;
81
    }
82

  
83
    fprintf(stderr,"Initial Chunk Id %d\n", res->id);
74 84
  }
75 85

  
76 86
  return res;

Also available in: Unified diff