mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-23 03:33:48 +00:00
FS-7513: don't write 0 data, openh264 might return 0
This commit is contained in:
parent
7d60e6e868
commit
046798a057
@ -1593,6 +1593,11 @@ static void write_canvas_image_to_codec_group(conference_obj_t *conference, code
|
|||||||
if (encode_status == SWITCH_STATUS_SUCCESS || encode_status == SWITCH_STATUS_MORE_DATA) {
|
if (encode_status == SWITCH_STATUS_SUCCESS || encode_status == SWITCH_STATUS_MORE_DATA) {
|
||||||
|
|
||||||
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) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (frame->timestamp) {
|
if (frame->timestamp) {
|
||||||
switch_set_flag(frame, SFF_RAW_RTP_PARSE_FRAME);
|
switch_set_flag(frame, SFF_RAW_RTP_PARSE_FRAME);
|
||||||
}
|
}
|
||||||
|
@ -10393,6 +10393,8 @@ 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;
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user