On Tue, May 17, 2011 at 11:49:49AM -0400, Mike Williams wrote: > Added fixes and tweaks suggested by Maksym Veremeyenko [[email protected]] > > Fixed another dereference in the RTSP code. Fixed a warning. > > Signed-off-by: Mike Williams <[email protected]> > --- > ffmpeg.c | 5 ++--- > ffserver.c | 21 ++++++++++----------- > 2 files changed, 12 insertions(+), 14 deletions(-) > > diff --git a/ffmpeg.c b/ffmpeg.c > index c99c4de..8905fe8 100644 > --- a/ffmpeg.c > +++ b/ffmpeg.c > @@ -626,13 +626,12 @@ static int read_ffserver_streams(AVFormatContext *s, > const char *filename) > if (err < 0) > return err; > /* copy stream format */ > - s->nb_streams = 0; > + s->nb_streams = ic->nb_streams; > + s->streams = av_mallocz(sizeof(AVStream *) * s->nb_streams); > 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));
This chunk is problematic: the number of stream must increment, because it is used in new_output_stream() to get the stream index. -- Clément B.
pgpgJdjKgfdlm.pgp
Description: PGP signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
