FS-7513: break is safer than continue
when the encoder returns 0, it means no more data will come and we should not try again
This commit is contained in:
parent
f6886b05d1
commit
30463bfc1e
|
@ -1595,7 +1595,7 @@ static void write_canvas_image_to_codec_group(conference_obj_t *conference, code
|
||||||
switch_assert((encode_status == SWITCH_STATUS_SUCCESS && frame->m) || !frame->m);
|
switch_assert((encode_status == SWITCH_STATUS_SUCCESS && frame->m) || !frame->m);
|
||||||
|
|
||||||
if (frame->datalen == 0) {
|
if (frame->datalen == 0) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame->timestamp) {
|
if (frame->timestamp) {
|
||||||
|
|
|
@ -10393,7 +10393,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
|
||||||
frame->flags &= ~SFF_PICTURE_RESET;
|
frame->flags &= ~SFF_PICTURE_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame->datalen == 0) continue;
|
if (frame->datalen == 0) break;
|
||||||
|
|
||||||
switch_set_flag(frame, SFF_RAW_RTP_PARSE_FRAME);
|
switch_set_flag(frame, SFF_RAW_RTP_PARSE_FRAME);
|
||||||
status = switch_core_session_write_encoded_video_frame(session, frame, flags, stream_id);
|
status = switch_core_session_write_encoded_video_frame(session, frame, flags, stream_id);
|
||||||
|
|
Loading…
Reference in New Issue