Commit 78728064 authored by Baptiste Coudurier's avatar Baptiste Coudurier

fix got_key_frame when stream is audio

Originally committed as revision 13552 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0332f549
...@@ -2099,10 +2099,11 @@ static int http_prepare_data(HTTPContext *c) ...@@ -2099,10 +2099,11 @@ static int http_prepare_data(HTTPContext *c)
} }
for(i=0;i<c->stream->nb_streams;i++) { for(i=0;i<c->stream->nb_streams;i++) {
if (c->feed_streams[i] == pkt.stream_index) { if (c->feed_streams[i] == pkt.stream_index) {
AVStream *st = c->fmt_in->streams[source_index];
pkt.stream_index = i; pkt.stream_index = i;
if (pkt.flags & PKT_FLAG_KEY && if (st->codec->codec_type == CODEC_TYPE_AUDIO ||
c->fmt_in->streams[source_index]->codec->codec_type (st->codec->codec_type == CODEC_TYPE_VIDEO &&
== CODEC_TYPE_VIDEO) pkt.flags & PKT_FLAG_KEY))
c->got_key_frame = 1; c->got_key_frame = 1;
if (!c->stream->send_on_key || c->got_key_frame) if (!c->stream->send_on_key || c->got_key_frame)
goto send_it; goto send_it;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment