ffserver: reflow compute_status()
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sat, 3 Jan 2015 01:30:05 +0000 (22:30 -0300)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sat, 3 Jan 2015 23:22:45 +0000 (20:22 -0300)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
ffserver.c

index 9472c41..93e5467 100644 (file)
@@ -1770,7 +1770,10 @@ static void compute_status(HTTPContext *c)
         char sfilename[1024];
         char *eosf;
 
-        if (stream->feed != stream) {
+        if (stream->feed == stream) {
+            stream = stream->next;
+            continue;
+        }
             av_strlcpy(sfilename, stream->filename, sizeof(sfilename) - 10);
             eosf = sfilename + strlen(sfilename);
             if (eosf - sfilename >= 4) {
@@ -1849,14 +1852,16 @@ static void compute_status(HTTPContext *c)
                 avio_printf(pb, "<td align=center> - <td align=right> - <td align=right> - <td><td align=right> - <td>\n");
                 break;
             }
-        }
         stream = stream->next;
     }
     avio_printf(pb, "</table>\n");
 
     stream = config.first_stream;
     while (stream) {
-        if (stream->feed == stream) {
+        if (stream->feed != stream) {
+            stream = stream->next;
+            continue;
+        }
             avio_printf(pb, "<h2>Feed %s</h2>", stream->filename);
             if (stream->pid) {
                 avio_printf(pb, "Running as pid %d.\n", stream->pid);
@@ -1916,7 +1921,6 @@ static void compute_status(HTTPContext *c)
             }
             avio_printf(pb, "</table>\n");
 
-        }
         stream = stream->next;
     }