ffserver: Fix a null pointer dereference as a result of the FF_API_MAX_STREAMS cleanup.

Fixed another dereference in the RTSP code.

Removed a useless variable.

Changed an unnecessary looping assignment to a simple assignment suggested by
Maksym.

Added fixes and tweaks suggested by Maksym Veremeyenko [verem@m1stereo.tv] and
Clément B.
This commit is contained in:
Mike Williams
2011-05-18 11:03:10 -04:00
committed by Reinhard Tartler
parent 2341c97e8d
commit db3262b700
2 changed files with 11 additions and 11 deletions

View File

@ -673,6 +673,7 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
return err;
/* copy stream format */
s->nb_streams = 0;
s->streams = av_mallocz(sizeof(AVStream *) * ic->nb_streams);
for(i=0;i<ic->nb_streams;i++) {
AVStream *st;
AVCodec *codec;