[FFmpeg-cvslog] ffserver: set oformat

Michael Niedermayer git at videolan.org
Mon Dec 10 00:27:14 CET 2012


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  9 23:34:32 2012 +0100| [9929991da7b843e7d80154fcacc4e80579b86a2d] | committer: Carl Eugen Hoyos

ffserver: set oformat

Fix Ticket1986

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9929991da7b843e7d80154fcacc4e80579b86a2d
---

 ffserver.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ffserver.c b/ffserver.c
index 4044d0f..8740140 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;



More information about the ffmpeg-cvslog mailing list