TeeSlave *slaves;
int use_fifo;
AVDictionary *fifo_options;
- char *fifo_options_str;
} TeeContext;
static const char *const slave_delim = "|";
static const AVOption options[] = {
{"use_fifo", "Use fifo pseudo-muxer to separate actual muxers from encoder",
OFFSET(use_fifo), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
- {"fifo_options", "fifo pseudo-muxer options", OFFSET(fifo_options_str),
- AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM},
+ {"fifo_options", "fifo pseudo-muxer options", OFFSET(fifo_options),
+ AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM},
{NULL}
};
goto end;
}
- ret = ff_format_output_open(avf2, filename, NULL);
+ ret = ff_format_output_open(avf2, filename, &options);
if (ret < 0) {
av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,
av_err2str(ret));
filename++;
}
- if (tee->fifo_options_str) {
- ret = av_dict_parse_string(&tee->fifo_options, tee->fifo_options_str, "=", ":", 0);
- if (ret < 0)
- goto fail;
- }
-
if (!(tee->slaves = av_mallocz_array(nb_slaves, sizeof(*tee->slaves)))) {
ret = AVERROR(ENOMEM);
goto fail;
if (s2 < 0)
continue;
- memset(&pkt2, 0, sizeof(AVPacket));
if ((ret = av_packet_ref(&pkt2, pkt)) < 0)
if (!ret_all) {
ret_all = ret;
return ret_all;
}
-AVOutputFormat ff_tee_muxer = {
+const AVOutputFormat ff_tee_muxer = {
.name = "tee",
.long_name = NULL_IF_CONFIG_SMALL("Multiple muxer tee"),
.priv_data_size = sizeof(TeeContext),
.write_trailer = tee_write_trailer,
.write_packet = tee_write_packet,
.priv_class = &tee_muxer_class,
- .flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
+ .flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
};