diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-05-30 02:32:58 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-05-30 02:32:58 +0000 |
commit | 78728064c361b213ad9b0e8dd77156e20ea0f88e (patch) | |
tree | 4254930a3f0280f2494e286ac6d9ce1fbac7b3f9 /ffserver.c | |
parent | 0332f549455a6ed85a4cf021047473790cab7ec2 (diff) | |
download | ffmpeg-78728064c361b213ad9b0e8dd77156e20ea0f88e.tar.gz |
fix got_key_frame when stream is audio
Originally committed as revision 13552 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index 5bfa162286..b9bae76688 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2099,10 +2099,11 @@ static int http_prepare_data(HTTPContext *c) } 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; |