[Ffmpeg-cvslog] CVS: ffmpeg ffserver.c,1.94,1.95

Michael Niedermayer CVS michael
Mon Jul 18 11:03:00 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv18493

Modified Files:
	ffserver.c 
Log Message:
ffserver segfault & other fatal failure fixes


Index: ffserver.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffserver.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- ffserver.c	17 Jul 2005 22:24:35 -0000	1.94
+++ ffserver.c	18 Jul 2005 09:02:56 -0000	1.95
@@ -2000,6 +2000,7 @@
             AVStream *st;
 	    AVStream *src;
             st = av_mallocz(sizeof(AVStream));
+            st->codec= avcodec_alloc_context();
             c->fmt_ctx.streams[i] = st;
             /* if file or feed, then just take streams from FFStream struct */
             if (!c->stream->feed || 
@@ -3138,6 +3139,7 @@
     st = av_mallocz(sizeof(AVStream));
     if (!st)
         goto fail;
+    st->codec= avcodec_alloc_context();
     ctx->nb_streams = 1;
     ctx->streams[0] = st;
 
@@ -3221,6 +3223,7 @@
     fst = av_mallocz(sizeof(AVStream));
     if (!fst)
         return NULL;
+    fst->codec= avcodec_alloc_context();
     fst->priv_data = av_mallocz(sizeof(FeedData));
     memcpy(fst->codec, codec, sizeof(AVCodecContext));
     fst->codec->coded_frame = &dummy_frame;
@@ -3664,6 +3667,7 @@
     st = av_mallocz(sizeof(AVStream));
     if (!st)
         return;
+    st->codec = avcodec_alloc_context();
     stream->streams[stream->nb_streams++] = st;
     memcpy(st->codec, av, sizeof(AVCodecContext));
 }
@@ -3971,7 +3975,7 @@
                 stream->stream_type = STREAM_TYPE_LIVE;
                 /* jpeg cannot be used here, so use single frame jpeg */
                 if (!strcmp(arg, "jpeg"))
-                    strcpy(arg, "singlejpeg");
+                    strcpy(arg, "mjpeg");
                 stream->fmt = guess_stream_format(arg, NULL, NULL);
                 if (!stream->fmt) {
                     fprintf(stderr, "%s:%d: Unknown Format: %s\n", 





More information about the ffmpeg-cvslog mailing list