summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorRocky Cardwell <rocky.cardwell@lifespringschool.org>2010-10-29 14:54:18 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-10-29 14:54:18 +0000
commitb67f3d65757e9b08a797f584ee818ad7cfe7b303 (patch)
tree3f5890fdc4a8af6f7c1916f5353ad3ee9d531f17 /ffmpeg.c
parentec1ca41cef41a4180ba9d7331842602e15329d88 (diff)
Fix ffserver-related regression (and crash) introduced in r25500.
Fixes issue 2317. Patch by Rocky Cardwell, rocky d cardwell a lifespringschool d org Originally committed as revision 25603 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 33444c2b41..83f4bb712d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -664,11 +664,13 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
if (err < 0)
return err;
/* copy stream format */
- s->nb_streams = ic->nb_streams;
+ s->nb_streams = 0;
for(i=0;i<ic->nb_streams;i++) {
AVStream *st;
AVCodec *codec;
+ s->nb_streams++;
+
// FIXME: a more elegant solution is needed
st = av_mallocz(sizeof(AVStream));
memcpy(st, ic->streams[i], sizeof(AVStream));
@@ -700,6 +702,8 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
if(st->codec->flags & CODEC_FLAG_BITEXACT)
nopts = 1;
+
+ new_output_stream(s, nb_output_files);
}
if (!nopts)