diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-09 23:34:32 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-12-10 00:26:56 +0100 |
commit | 9929991da7b843e7d80154fcacc4e80579b86a2d (patch) | |
tree | 0782f24b719866329765899cd37e130d857d47c1 | |
parent | 1b0c1df3b9d6238e0f9417a88895a7ca8ab43758 (diff) | |
download | ffmpeg-9929991da7b843e7d80154fcacc4e80579b86a2d.tar.gz |
ffserver: set oformat
Fix Ticket1986
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
-rw-r--r-- | ffserver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c index 4044d0fa57..87401402f8 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2937,12 +2937,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; |