Commit 1986dd0f authored by bcoudurier's avatar bcoudurier

move code setting output parameters after possible failure

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13876 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 01fdc922
......@@ -2040,10 +2040,7 @@ static int http_prepare_data(HTTPContext *c)
av_strlcpy(c->fmt_ctx.title, c->stream->title,
sizeof(c->fmt_ctx.title));
/* open output stream by using specified codecs */
c->fmt_ctx.oformat = c->stream->fmt;
c->fmt_ctx.nb_streams = c->stream->nb_streams;
for(i=0;i<c->fmt_ctx.nb_streams;i++) {
for(i=0;i<c->stream->nb_streams;i++) {
AVStream *st;
AVStream *src;
st = av_mallocz(sizeof(AVStream));
......@@ -2060,6 +2057,10 @@ static int http_prepare_data(HTTPContext *c)
st->codec->frame_number = 0; /* XXX: should be done in
AVStream, not in codec */
}
/* set output format parameters */
c->fmt_ctx.oformat = c->stream->fmt;
c->fmt_ctx.nb_streams = c->stream->nb_streams;
c->got_key_frame = 0;
/* prepare header and save header data in a stream */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment