Revision 74a5d4ae Chunkiser/input-stream-avs.c

View differences:

Chunkiser/input-stream-avs.c
4 4
 *  This is free software; see gpl-3.0.txt
5 5
 */
6 6

  
7

  
8
#define __STDC_CONSTANT_MACROS 1
9
#include <stdint.h>
10
#include <stdbool.h>
11

  
12

  
13
#ifdef __cplusplus
14
extern "C" {
15
#endif
16 7
#include <libavformat/avformat.h>
17
#ifdef __cplusplus
18
}
19
#endif
20

  
8
#include <stdbool.h>
21 9

  
22 10
#include "../dbg.h"
23 11
#include "../input-stream.h"
......
123 111
struct input_stream *input_stream_open(const char *fname, int *period, uint16_t flags)
124 112
{
125 113
  struct input_stream *desc;
126
  size_t i;
127
  int res;
114
  int i, res;
128 115

  
129 116
  avcodec_register_all();
130 117
  av_register_all();
131 118

  
132
  desc = (struct input_stream *)malloc(sizeof(struct input_stream));
119
  desc = malloc(sizeof(struct input_stream));
133 120
  if (desc == NULL) {
134 121
    return NULL;
135 122
  }
......
298 285
      }
299 286
    }
300 287
    *size = pkt.size + s->s->streams[pkt.stream_index]->codec->extradata_size * header_out + header_size + FRAME_HEADER_SIZE;
301
    data = (uint8_t *)malloc(*size);
288
    data = malloc(*size);
302 289
    if (data == NULL) {
303 290
      *size = -1;
304 291
      av_free_packet(&pkt);

Also available in: Unified diff