av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->url);
av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->url);
if (!st->codecpar->bit_rate) {
av_log(s, AV_LOG_ERROR, "No bit rate set for stream %d\n", i);
if (!st->codecpar->bit_rate) {
av_log(s, AV_LOG_ERROR, "No bit rate set for stream %d\n", i);
os->has_audio = 1;
} else {
av_log(s, AV_LOG_ERROR, "Unsupported stream type in stream %d\n", i);
os->has_audio = 1;
} else {
av_log(s, AV_LOG_ERROR, "Unsupported stream type in stream %d\n", i);
s->streams[i]->id = c->nb_streams;
if (!(st = avformat_new_stream(ctx, NULL))) {
s->streams[i]->id = c->nb_streams;
if (!(st = avformat_new_stream(ctx, NULL))) {
}
avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar);
st->codecpar->codec_tag = 0;
}
avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar);
st->codecpar->codec_tag = 0;
OutputStream *os = &c->streams[i];
int j;
if ((ret = avformat_write_header(os->ctx, NULL)) < 0) {
OutputStream *os = &c->streams[i];
int j;
if ((ret = avformat_write_header(os->ctx, NULL)) < 0) {
"%s/stream%d_temp", s->url, i);
ret = init_file(s, os, 0);
if (ret < 0)
"%s/stream%d_temp", s->url, i);
ret = init_file(s, os, 0);
if (ret < 0)
if (!os->has_video && c->min_frag_duration <= 0) {
av_log(s, AV_LOG_WARNING,
if (!os->has_video && c->min_frag_duration <= 0) {
av_log(s, AV_LOG_WARNING,
.write_header = hds_write_header,
.write_packet = hds_write_packet,
.write_trailer = hds_write_trailer,
.write_header = hds_write_header,
.write_packet = hds_write_packet,
.write_trailer = hds_write_trailer,