Revision 74a5d4ae out-stream-avf.c

View differences:

out-stream-avf.c
4 4
 *  This is free software; see gpl-3.0.txt
5 5
 */
6 6

  
7
#define __STDC_CONSTANT_MACROS 1
8
#include <stdint.h>
9

  
10
#ifdef __cplusplus
11
extern "C" {
12
#endif
13 7
#include <libavformat/avformat.h>
14
#ifdef __cplusplus
15
}
16
#endif
17

  
18

  
19 8
#include <stdio.h>
20 9

  
21 10
#include "out-stream.h"
......
58 47
      return CODEC_ID_DIRAC;
59 48
    default:
60 49
      fprintf(stderr, "Unknown codec %d\n", mytype);
61
      return CODEC_ID_NONE;
50
      return 0;
62 51
  }
63 52
}
64 53

  
......
149 138
    dts += (dts < prev_dts - ((1L << 31) - 1)) ? ((prev_dts >> 32) + 1) << 32 : (prev_dts >> 32) << 32;
150 139
    prev_dts = dts;
151 140
    pkt.dts = av_rescale_q(dts, outctx->streams[0]->codec->time_base, outctx->streams[0]->time_base);
152
    pkt.data = (uint8_t *)p;
141
    pkt.data = p;
153 142
    p += frame_size;
154 143
    pkt.size = frame_size;
155 144
    av_interleaved_write_frame(outctx, &pkt);

Also available in: Unified diff