1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Don't wait for video keyframes on audio-only streams.

This commit is contained in:
Joseph Wallace 2015-11-20 14:27:00 -05:00
parent 9cf4ed560c
commit e4258bfad3

View File

@ -481,8 +481,13 @@ static int ebml_read(ebml_t *ebml, char *buffer, int len, ebml_chunk_type *chunk
if (ebml->cluster_start == 0) {
/* new cluster is starting now */
if (ebml->cluster_starts_with_keyframe == EBML_KEYFRAME_STARTS_CLUSTER) {
/* Successfully found a keyframe in this cluster's video track */
if (ebml->cluster_starts_with_keyframe != EBML_KEYFRAME_DOES_NOT_START_CLUSTER) {
/* If we positively identified the first video frame as a non-keyframe,
* don't use this cluster as a sync point. Since some files lack
* video tracks completely, or we may have failed to probe
* the first video frame, it's better to be pass through
* ambiguous cases to avoid blocking the stream forever.
*/
*chunk_type = EBML_CHUNK_CLUSTER_START;
}