[FFmpeg-devel] [PATCH] ffserver crash when non-existent url is selected

Aurelien Jacobs aurel
Mon Sep 17 13:46:43 CEST 2007


On Mon, 17 Sep 2007 10:02:37 +0200
Luca Abeni <lucabe72 at email.it> wrote:

> Hi all,
> 
> I just noticed that ffserver is crashing if I try to play an rtsp url 
> that does not exist in the configure file. It looks like the bug has 
> been introduced in r10474 ("rtp and rtsp demuxer declarations are not 
> part of public API"), and the problem is in this change:
> @@ -2683,7 +2683,7 @@
>           path++;
> 
>       for(stream = first_stream; stream != NULL; stream = stream->next) {
> -        if (!stream->is_feed && stream->fmt == &rtp_muxer &&
> +        if (!stream->is_feed && !strcmp(stream->fmt->name, "rtp") &&
>               !strcmp(path, stream->filename)) {
>               goto found;
>           }
> The fact is that stream->fmt can be NULL... The attached patch fixes the 
> problem.

Oh, right !
Maybe try to shrink down overly long lines you introduce in this patch.
Except long lines, patch is OK.

Aurel




More information about the ffmpeg-devel mailing list