obs-outputs: Do not drop I-frames

When frames were dropped, it would also drop I-frames, which can mess
with the keyframe calculation of certain services that depend on
I-frames in their output protocol (such as HLS).
master
jp9000 2015-04-08 05:55:46 -07:00
parent 4e54c89f9c
commit 0e2a5d2de2
1 changed files with 3 additions and 1 deletions

View File

@ -508,7 +508,9 @@ static void drop_frames(struct rtmp_stream *stream)
last_drop_dts_usec = packet.dts_usec; last_drop_dts_usec = packet.dts_usec;
if (packet.type == OBS_ENCODER_AUDIO) { /* do not drop audio data or video keyframes */
if (packet.type == OBS_ENCODER_AUDIO ||
packet.drop_priority == OBS_NAL_PRIORITY_HIGHEST) {
circlebuf_push_back(&new_buf, &packet, sizeof(packet)); circlebuf_push_back(&new_buf, &packet, sizeof(packet));
} else { } else {