[FFmpeg-cvslog] r13552 - trunk/ffserver.c

bcoudurier subversion
Fri May 30 04:32:58 CEST 2008


Author: bcoudurier
Date: Fri May 30 04:32:58 2008
New Revision: 13552

Log:
fix got_key_frame when stream is audio

Modified:
   trunk/ffserver.c

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	(original)
+++ trunk/ffserver.c	Fri May 30 04:32:58 2008
@@ -2099,10 +2099,11 @@ static int http_prepare_data(HTTPContext
                     }
                     for(i=0;i<c->stream->nb_streams;i++) {
                         if (c->feed_streams[i] == pkt.stream_index) {
+                            AVStream *st = c->fmt_in->streams[source_index];
                             pkt.stream_index = i;
-                            if (pkt.flags & PKT_FLAG_KEY &&
-                                c->fmt_in->streams[source_index]->codec->codec_type
-                                == CODEC_TYPE_VIDEO)
+                            if (st->codec->codec_type == CODEC_TYPE_AUDIO ||
+                                (st->codec->codec_type == CODEC_TYPE_VIDEO &&
+                                 pkt.flags & PKT_FLAG_KEY))
                                 c->got_key_frame = 1;
                             if (!c->stream->send_on_key || c->got_key_frame)
                                 goto send_it;




More information about the ffmpeg-cvslog mailing list