ret = avformat_open_input(&s, input_filename, c->stream->ifmt,
&c->stream->in_opts);
if (ret < 0) {
- http_log("Could not open input '%s': %s\n", input_filename, av_err2str(ret));
+ http_log("Could not open input '%s': %s\n",
+ input_filename, av_err2str(ret));
return ret;
}
c->fmt_ctx = *ctx;
av_freep(&ctx);
av_dict_copy(&(c->fmt_ctx.metadata), c->stream->metadata, 0);
- c->fmt_ctx.streams = av_mallocz_array(c->stream->nb_streams, sizeof(AVStream *));
+ c->fmt_ctx.streams = av_mallocz_array(c->stream->nb_streams,
+ sizeof(AVStream *));
for(i=0;i<c->stream->nb_streams;i++) {
AVStream *src;
max_packet_size = RTSP_TCP_MAX_PACKET_SIZE;
else
max_packet_size = c->rtp_handles[c->packet_stream_index]->max_packet_size;
- ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size);
+ ret = ffio_open_dyn_packet_buf(&ctx->pb,
+ max_packet_size);
} else {
ret = avio_open_dyn_buf(&ctx->pb);
}
ctx->pb->seekable = 0;
if (pkt.dts != AV_NOPTS_VALUE)
- pkt.dts = av_rescale_q(pkt.dts, ist->time_base, ost->time_base);
+ pkt.dts = av_rescale_q(pkt.dts, ist->time_base,
+ ost->time_base);
if (pkt.pts != AV_NOPTS_VALUE)
- pkt.pts = av_rescale_q(pkt.pts, ist->time_base, ost->time_base);
- pkt.duration = av_rescale_q(pkt.duration, ist->time_base, ost->time_base);
+ pkt.pts = av_rescale_q(pkt.pts, ist->time_base,
+ ost->time_base);
+ pkt.duration = av_rescale_q(pkt.duration, ist->time_base,
+ ost->time_base);
if ((ret = av_write_frame(ctx, &pkt)) < 0) {
http_log("Error writing frame to output for stream '%s': %s\n",
c->stream->filename, av_err2str(ret));
ffurl_write(c->rtp_handles[c->packet_stream_index],
c->buffer_ptr, len);
c->buffer_ptr += len;
- /* here we continue as we can send several packets per 10 ms slot */
+ /* here we continue as we can send several packets
+ * per 10 ms slot */
}
} else {
/* TCP data output */
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
}
- if (!(avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams))))
+ avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams));
+ if (!avc->streams)
goto sdp_done;
- if (!(avs = av_malloc_array(avc->nb_streams, sizeof(*avs))))
+
+ avs = av_malloc_array(avc->nb_streams, sizeof(*avs));
+ if (!avs)
goto sdp_done;
for(i = 0; i < stream->nb_streams; i++) {
/* get the host IP */
len = sizeof(my_addr);
getsockname(c->fd, (struct sockaddr *)&my_addr, &len);
- content_length = prepare_sdp_description(stream, &content, my_addr.sin_addr);
+ content_length = prepare_sdp_description(stream, &content,
+ my_addr.sin_addr);
if (content_length < 0) {
rtsp_reply_error(c, RTSP_STATUS_INTERNAL);
return;
if (p[0] == 0x00 && p[1] == 0x00 &&
p[2] == 0x01 && p[3] == 0xb6) {
size = p - pkt.data;
- // av_hex_dump_log(infile, AV_LOG_DEBUG, pkt.data, size);
st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
st->codec->extradata_size = size;
memcpy(st->codec->extradata, pkt.data, size);
} else {
/* we handle a stream coming from a feed */
for(i=0;i<stream->nb_streams;i++)
- stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]);
+ stream->feed_streams[i] = add_av_stream(feed,
+ stream->streams[i]);
}
}
}