/* disable pts hack for testing */
int ffm_nopts = 0;
+#ifdef CONFIG_ENCODERS
static void flush_packet(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
/* 'first' is true if first data of a frame */
static void ffm_write_data(AVFormatContext *s,
- uint8_t *buf, int size,
+ const uint8_t *buf, int size,
int64_t pts, int first)
{
FFMContext *ffm = s->priv_data;
}
static int ffm_write_packet(AVFormatContext *s, int stream_index,
- uint8_t *buf, int size, int force_pts)
+ const uint8_t *buf, int size, int64_t force_pts)
{
AVStream *st = s->streams[stream_index];
FFMStream *fst = st->priv_data;
av_freep(&s->streams[i]->priv_data);
return 0;
}
+#endif //CONFIG_ENCODERS
/* ffm demux */
ffm_seek,
};
+#ifdef CONFIG_ENCODERS
static AVOutputFormat ffm_oformat = {
"ffm",
"ffm format",
ffm_write_packet,
ffm_write_trailer,
};
+#endif //CONFIG_ENCODERS
int ffm_init(void)
{
av_register_input_format(&ffm_iformat);
+#ifdef CONFIG_ENCODERS
av_register_output_format(&ffm_oformat);
+#endif //CONFIG_ENCODERS
return 0;
}