Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 2af2266

Browse files
taste1981jianjunz
authored andcommitted
Do not check last_fragment flag for non h.264/h.265 stream (#94)
1 parent 95d4e57 commit 2af2266

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

call/rtp_video_sender.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,14 @@ EncodedImageCallback::Result RtpVideoSender::OnEncodedImage(
609609
}
610610
RTPVideoHeader rtp_video_header = params_[stream_index].GetRtpVideoHeader(
611611
encoded_image, codec_specific_info, shared_frame_id_);
612-
if (codec_specific_info->codecSpecific.H264.last_fragment_in_frame)
612+
if (codec_specific_info->codecType == kVideoCodecH264 &&
613+
codec_specific_info->codecSpecific.H264.last_fragment_in_frame)
613614
absl::get<RTPVideoHeaderH264>(rtp_video_header.video_type_header)
614615
.has_last_fragement = true;
615616
#ifndef DISABLE_H265
616-
else if (codec_specific_info->codecSpecific.H265.last_fragment_in_frame)
617+
else if (codec_specific_info->codecType ==
618+
kVideoCodecH265 && codec_specific_info->codecSpecific.H265
619+
.last_fragment_in_frame)
617620
absl::get<RTPVideoHeaderH265>(rtp_video_header.video_type_header)
618621
.has_last_fragement = true;
619622
#endif

0 commit comments

Comments
 (0)