提交 046798a0 authored 作者: Seven Du's avatar Seven Du 提交者: Michael Jerris

FS-7513: don't write 0 data, openh264 might return 0

上级 7d60e6e8
...@@ -1593,6 +1593,11 @@ static void write_canvas_image_to_codec_group(conference_obj_t *conference, code ...@@ -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 ...@@ -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);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论