[FFmpeg-devel] [PATCH] ffserver rtsp bug fixes

Martin Storsjö martin
Mon May 17 13:59:02 CEST 2010


On Mon, 17 May 2010, Howard Chu wrote:

> Again, it turned out to be something really simple - the sdp response was
> missing a required c= (connection) record. I've fixed this by using "0.0.0.0"
> when no IP address was provided by the calling app.

> --- libavformat/sdp.c	(revision 22902)
> +++ libavformat/sdp.c	(working copy)
> @@ -55,7 +55,8 @@
>          } else {
>              av_strlcatf(buff, size, "c=IN IP4 %s\r\n", dest_addr);
>          }
> -    }
> +    } else
> +        av_strlcatf(buff, size, "c=IN IP4 0.0.0.0\r\n");
>  }
>  

This will make the SDP generator emit more c= lines than what is intended. 
If you want to make sure the ffserver generated SDP contains a c= line, 
it's better to populate the AVFormatContext->filename field for 
non-multicast cases, too. The attached patch does this - Howard already 
tested this and it seemed to work fine.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffserver-sdp.patch
Type: text/x-diff
Size: 525 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100517/dd0170a9/attachment.patch>



More information about the ffmpeg-devel mailing list