check av_open_input_stream error
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 22 Jun 2008 03:25:20 +0000 (03:25 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 22 Jun 2008 03:25:20 +0000 (03:25 +0000)
Originally committed as revision 13874 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 2449a80..24996d3 100644 (file)
@@ -2494,7 +2494,10 @@ static int http_receive_data(HTTPContext *c)
             if (!fmt_in)
                 goto fail;
 
-            av_open_input_stream(&s, pb, c->stream->feed_filename, fmt_in, NULL);
+            if (av_open_input_stream(&s, pb, c->stream->feed_filename, fmt_in, NULL) < 0) {
+                av_free(pb);
+                goto fail;
+            }
 
             /* Now we have the actual streams */
             if (s->nb_streams != feed->nb_streams) {