q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: video/x-ms-asf\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<ASX Version=\"3\">\r\n");
- q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<!-- Autogenerated by ffserver -->\r\n");
+ //q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<!-- Autogenerated by ffserver -->\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<ENTRY><REF HREF=\"http://%s/%s%s\"/></ENTRY>\r\n",
hostbuf, filename, info);
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "</ASX>\r\n");
c->fmt_ctx.nb_streams = c->stream->nb_streams;
for(i=0;i<c->fmt_ctx.nb_streams;i++) {
AVStream *st;
+ AVStream *src;
st = av_mallocz(sizeof(AVStream));
c->fmt_ctx.streams[i] = st;
/* if file or feed, then just take streams from FFStream struct */
if (!c->stream->feed ||
c->stream->feed == c->stream)
- memcpy(st, c->stream->streams[i], sizeof(AVStream));
+ src = c->stream->streams[i];
else
- memcpy(st, c->stream->feed->streams[c->stream->feed_streams[i]],
- sizeof(AVStream));
+ src = c->stream->feed->streams[c->stream->feed_streams[i]];
+
+ *st = *src;
+ st->priv_data = 0;
st->codec.frame_number = 0; /* XXX: should be done in
AVStream, not in codec */
/* I'm pretty sure that this is not correct...
memcpy(&fst->codec, codec, sizeof(AVCodecContext));
fst->codec.coded_frame = &dummy_frame;
fst->index = stream->nb_streams;
+ av_set_pts_info(fst, 33, 1, 90000);
stream->streams[stream->nb_streams++] = fst;
return fst;
}
if (video_id != CODEC_ID_NONE) {
video_enc.codec_type = CODEC_TYPE_VIDEO;
video_enc.codec_id = video_id;
+ if (!video_enc.rc_buffer_size) {
+ video_enc.rc_buffer_size = 40 * 1024;
+ }
add_codec(stream, &video_enc);
}
}