diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-22 03:42:23 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-22 03:42:23 +0000 |
commit | 3d9cc27df8786f75d3119b277a58e348c4c7ab12 (patch) | |
tree | 940b3c594f5de953cc3c0d09a7e1f710e2999f5f /ffserver.c | |
parent | 697efa36c72280caf0b6bca74180e27a0bedd666 (diff) | |
download | ffmpeg-3d9cc27df8786f75d3119b277a58e348c4c7ab12.tar.gz |
move code setting output parameters after possible failure
Originally committed as revision 13876 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ffserver.c b/ffserver.c index c982b3a6c9..7ca7ab54db 100644 --- a/ffserver.c +++ b/ffserver.c @@ -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 */ |