2nd try fix got_key_frame when video+audio
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Fri, 30 May 2008 17:53:50 +0000 (17:53 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Fri, 30 May 2008 17:53:50 +0000 (17:53 +0000)
Originally committed as revision 13559 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index b9bae76..153a130 100644 (file)
@@ -2101,9 +2101,9 @@ static int http_prepare_data(HTTPContext *c)
                         if (c->feed_streams[i] == pkt.stream_index) {
                             AVStream *st = c->fmt_in->streams[source_index];
                             pkt.stream_index = i;
-                            if (st->codec->codec_type == CODEC_TYPE_AUDIO ||
-                                (st->codec->codec_type == CODEC_TYPE_VIDEO &&
-                                 pkt.flags & PKT_FLAG_KEY))
+                            if (pkt.flags & PKT_FLAG_KEY &&
+                                (st->codec->codec_type == CODEC_TYPE_VIDEO ||
+                                 c->stream->nb_streams == 1))
                                 c->got_key_frame = 1;
                             if (!c->stream->send_on_key || c->got_key_frame)
                                 goto send_it;