X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffserver.c;h=d8627bd26fc9789d9278077af63040bad4c48202;hb=cb0f97b59d67bda2c33586922640e65e128c17fb;hp=3af481ddde12d99f921d69c342fb433287a17f8f;hpb=54a71f2e6c9d8ff42ac0367d54b9df39a31cb3ff;p=ffmpeg diff --git a/ffserver.c b/ffserver.c index 3af481ddde1..d8627bd26fc 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2961,12 +2961,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, { AVFormatContext *avc; AVStream *avs = NULL; + AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); int i; avc = avformat_alloc_context(); - if (avc == NULL) { + if (avc == NULL || !rtp_format) { return -1; } + avc->oformat = rtp_format; av_dict_set(&avc->metadata, "title", stream->title[0] ? stream->title : "No Title", 0); avc->nb_streams = stream->nb_streams;