|
|
@ -2100,17 +2100,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) { |
|
|
|
pkt.stream_index = i; |
|
|
|
pkt.stream_index = i; |
|
|
|
if (pkt.flags & PKT_FLAG_KEY) |
|
|
|
if (pkt.flags & PKT_FLAG_KEY && |
|
|
|
c->got_key_frame |= 1 << i; |
|
|
|
c->fmt_in->streams[source_index]->codec->codec_type |
|
|
|
/* See if we have all the key frames, then
|
|
|
|
== CODEC_TYPE_VIDEO) |
|
|
|
* we start to send. This logic is not quite |
|
|
|
c->got_key_frame = 1; |
|
|
|
* right, but it works for the case of a |
|
|
|
if (!c->stream->send_on_key || c->got_key_frame) |
|
|
|
* single video stream with one or more |
|
|
|
|
|
|
|
* audio streams (for which every frame is |
|
|
|
|
|
|
|
* typically a key frame). |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if (!c->stream->send_on_key || |
|
|
|
|
|
|
|
((c->got_key_frame + 1) >> c->stream->nb_streams)) |
|
|
|
|
|
|
|
goto send_it; |
|
|
|
goto send_it; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|