Revision be9e4a42

View differences:

src/Chunkiser/output-stream-avf.c
19 19
  AVFormatContext *outctx;
20 20
};
21 21

  
22
static struct output_stream out;
23

  
24 22
static enum CodecID libav_codec_id(uint8_t mytype)
25 23
{
26 24
  switch (mytype) {
......
94 92

  
95 93
static struct output_stream *avf_init(const char *fname, const char *config)
96 94
{
97
  out.output_format = "nut";
95
  struct output_stream *out;
96

  
97
  out = malloc(sizeof(struct output_stream));
98
  if (out == NULL) {
99
    return NULL;
100
  }
101

  
102
  memset(out, 0, sizeof(struct output_stream));
103
  out->output_format = "nut";
98 104
  if (fname) {
99
    out.output_file = strdup(fname);
105
    out->output_file = strdup(fname);
100 106
  } else {
101
    out.output_file = "/dev/stdout";
107
    out->output_file = "/dev/stdout";
102 108
  }
103
  out.outctx = NULL;
104 109

  
105
  return &out;
110
  return out;
106 111
}
107 112

  
108 113
static void avf_write(struct output_stream *o, int id, uint8_t *data, int size)

Also available in: Unified diff