Index: webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc |
index 64bd5aa25c07249f1c6e96fa4aea3a75fef6d784..2f5e2e9b1e5e58314a6011e493c9c8bc2dc7a4f3 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc |
@@ -578,7 +578,9 @@ bool RtpPacketizerVp9::NextPacket(uint8_t* buffer, |
if (!WriteHeaderAndPayload(packet_info, buffer, bytes_to_send)) { |
return false; |
} |
- *last_packet = packets_.empty(); |
+ *last_packet = |
+ packets_.empty() && (hdr_.spatial_idx == kNoSpatialIdx || |
+ hdr_.spatial_idx == hdr_.num_spatial_layers - 1); |
return true; |
} |