You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your response was as follows:
The problem is suspected to be the loss of RTP packets containing fragmented units. According to the RTSP H.264 and H.265 RFC specifications, "If a fragmented unit is lost, the receiver should discard all subsequent fragmented units corresponding to the same NAL unit." ExoPlaver does not currently perform this operation, and therefore may be writing incomplete NAL units.
My question is, if the problematic NAL unit has a problem, shouldn't the next NAL unit be able to decode and play normally? So why does the problematic NAL unit cause the SampleDataQueue to keep growing, eventually leading to a heap memory overflow?
Thank you for your answer.
Thank you for creating a new ticket to continue the issue first brought up in #2613.
As written in the old ticket, with this commit, 8f0b9ac, ExoPlayer should correctly start decoding from the next NAL unit.
Just to clarify, can you confirm that the linked fix did resolve the original issue of the missing fragmentation unit and the stream now plays as expected?
As far as the heap memory issue, would you be able to provide a bug report from the demo application with reproducing this issue?
Edit: Thanks for your reply. My version is 1.8.0, and I've merged the code according to the new commits. After testing, I found that the video freezes when my RTP sequence number is discontinuous. I tried to fix the freezing issue, but the heap memory problem persists after testing.
How the Readers work is that they will write bytes to the SampleQueue via sampleData and then as soon as a full sample is finalized, the Reader will call sampleMetadata providing the size of the full, correct sample. If your stream is continually providing discontinuous RTP sequence numbers that cause invalid, non-full samples, then the allocations will continue to grow.
Since you are already debugging and able to reproduce the scenario, could you add trace logs to processFragmentationUnitPacket? I want to know how often your stream is sending discontinuous RTP sequence numbers. Is it a single mistake followed by a long stream of correct packets? Or after the first mistake, is there never again a packet that can be parsed? It would be great to have a list of sequence numbers starting at the mistake, printing the expected vs the actual, and then the packet numbers after that. Make sure to print out if a isLastFuPacket is found.
We might be able to fix the heap memory issue but if your stream is never fixing itself after the first discontinuous RTP sequence number then your scenario still won't work. This is why I'm asking for this additional trace information.
That is odd for the negative time value for the samples. Could you do reproduce the scenario and this time also provide the timestamp values utilized by toSampleTimeUs? It would be helpful to know what the startTimeOffset and first timestamp of your stream. With this information we can verify the correctness of the toSampleTimeUs calculation.
@return The calculated sample presentation time, in microseconds.
*/
public static long toSampleTimeUs(
long startTimeOffsetUs,
long rtpTimestamp,
long firstReceivedRtpTimestamp,
int mediaFrequency) {
// 关键:RTP timestamp 必须当 unsigned 32-bit 处理
long timestampDelta =
(rtpTimestamp - firstReceivedRtpTimestamp) & 0xFFFFFFFFL;
return startTimeOffsetUs
I have a few points to add: 1. We are using multiple cameras from different brands (Dahua, Hikvision, Tianyuan).
Our use case is long-term video surveillance.
Current issues include: (memory overflow, occasional large fragment units (FUs) causing packet disassembly failures or missing END bit markers, and issues with receiving IDR frames when the image is static for extended periods).
Another issue is that when assembling RTP packets and sending them to the media codec, it relies on the RTPMarker's status for judgment. If the network is poor or there is packet loss, the RTPMarker may not be received, causing the entire video feed to become distorted.
These are the issues I discovered through testing. I hope this is helpful. Thank you.
Hey @zhangyuankai. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Activity
[-]你好,我注意到了你们关于#2613问题的修改[/-][+]你好,我注意到了你们关于#2613问题的修改 (Question regarding #2613)[/+]tonihei commentedon Dec 8, 2025
(Updated issue with auto-translated text in English)
tonihei commentedon Dec 8, 2025
@microkatz Assigning to you as a follow-up to the other issue in #2613
microkatz commentedon Dec 8, 2025
@zhangyuankai
Thank you for creating a new ticket to continue the issue first brought up in #2613.
As written in the old ticket, with this commit, 8f0b9ac, ExoPlayer should correctly start decoding from the next NAL unit.
Just to clarify, can you confirm that the linked fix did resolve the original issue of the missing fragmentation unit and the stream now plays as expected?
As far as the heap memory issue, would you be able to provide a bug report from the demo application with reproducing this issue?
zhangyuankai commentedon Dec 9, 2025
感谢回答,我的版本是1.8.0,并且也按照新的提交合并了代码,测试后发现当我的RTP序列号有不连贯的情况时,视频会卡死掉,我尝试修复了卡死问题,测试后还是会有堆内存的问题
Edit: Thanks for your reply. My version is 1.8.0, and I've merged the code according to the new commits. After testing, I found that the video freezes when my RTP sequence number is discontinuous. I tried to fix the freezing issue, but the heap memory problem persists after testing.
microkatz commentedon Dec 9, 2025
@zhangyuankai
How the Readers work is that they will write bytes to the
SampleQueueviasampleDataand then as soon as a full sample is finalized, the Reader will callsampleMetadataproviding the size of the full, correct sample. If your stream is continually providing discontinuous RTP sequence numbers that cause invalid, non-full samples, then the allocations will continue to grow.Since you are already debugging and able to reproduce the scenario, could you add trace logs to
processFragmentationUnitPacket? I want to know how often your stream is sending discontinuous RTP sequence numbers. Is it a single mistake followed by a long stream of correct packets? Or after the first mistake, is there never again a packet that can be parsed? It would be great to have a list of sequence numbers starting at the mistake, printing the expected vs the actual, and then the packet numbers after that. Make sure to print out if a isLastFuPacket is found.We might be able to fix the heap memory issue but if your stream is never fixing itself after the first discontinuous RTP sequence number then your scenario still won't work. This is why I'm asking for this additional trace information.
Thanks for your support!
zhangyuankai commentedon Dec 18, 2025
2025-12-11 13:39:09.114 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 180
2025-12-11 13:39:09.114 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009918844, size=184, sequenceNumber=57977
2025-12-11 13:39:09.114 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.154 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57978, timestamp=50921696, marker=true
2025-12-11 13:39:09.154 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 204
2025-12-11 13:39:09.154 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009878844, size=208, sequenceNumber=57978
2025-12-11 13:39:09.154 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.194 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57979, timestamp=50925296, marker=true
2025-12-11 13:39:09.194 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 144
2025-12-11 13:39:09.195 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009838844, size=148, sequenceNumber=57979
2025-12-11 13:39:09.195 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.234 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57980, timestamp=50928896, marker=true
2025-12-11 13:39:09.234 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 160
2025-12-11 13:39:09.235 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009798844, size=164, sequenceNumber=57980
2025-12-11 13:39:09.235 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57981, timestamp=50932496, marker=false
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 28
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57982, timestamp=50932496, marker=false
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 4
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57983, timestamp=50932496, marker=false
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui D processFragmentationUnitPacket: First FU packet. Sequence number: 57983
2025-12-11 13:39:09.275 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.276 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57984, timestamp=50932496, marker=false
2025-12-11 13:39:09.276 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57985, timestamp=50932496, marker=false
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57986, timestamp=50932496, marker=false
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57987, timestamp=50932496, marker=false
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.277 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57988, timestamp=50932496, marker=false
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57989, timestamp=50932496, marker=false
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57990, timestamp=50932496, marker=false
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57991, timestamp=50932496, marker=false
2025-12-11 13:39:09.278 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.279 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57992, timestamp=50932496, marker=false
2025-12-11 13:39:09.279 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.294 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57993, timestamp=50932496, marker=false
2025-12-11 13:39:09.294 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57994, timestamp=50932496, marker=false
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57995, timestamp=50932496, marker=false
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57996, timestamp=50932496, marker=false
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.295 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57997, timestamp=50932496, marker=false
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57998, timestamp=50932496, marker=false
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=57999, timestamp=50932496, marker=false
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58000, timestamp=50932496, marker=false
2025-12-11 13:39:09.296 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58001, timestamp=50932496, marker=false
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58002, timestamp=50932496, marker=false
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58003, timestamp=50932496, marker=false
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58004, timestamp=50932496, marker=false
2025-12-11 13:39:09.297 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.298 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58005, timestamp=50932496, marker=false
2025-12-11 13:39:09.298 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.298 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58006, timestamp=50932496, marker=false
2025-12-11 13:39:09.298 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.339 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58007, timestamp=50932496, marker=false
2025-12-11 13:39:09.339 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.339 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58008, timestamp=50932496, marker=false
2025-12-11 13:39:09.339 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58009, timestamp=50932496, marker=false
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58010, timestamp=50932496, marker=false
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58011, timestamp=50932496, marker=false
2025-12-11 13:39:09.340 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.341 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58012, timestamp=50932496, marker=false
2025-12-11 13:39:09.341 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.341 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58013, timestamp=50932496, marker=false
2025-12-11 13:39:09.341 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58014, timestamp=50932496, marker=false
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58015, timestamp=50932496, marker=false
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58016, timestamp=50932496, marker=false
2025-12-11 13:39:09.342 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58017, timestamp=50932496, marker=false
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58018, timestamp=50932496, marker=false
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58019, timestamp=50932496, marker=false
2025-12-11 13:39:09.343 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58020, timestamp=50932496, marker=false
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58021, timestamp=50932496, marker=false
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58022, timestamp=50932496, marker=false
2025-12-11 13:39:09.344 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.345 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58023, timestamp=50932496, marker=false
2025-12-11 13:39:09.345 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.359 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58024, timestamp=50932496, marker=false
2025-12-11 13:39:09.359 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.359 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58025, timestamp=50932496, marker=false
2025-12-11 13:39:09.360 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.403 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58026, timestamp=50932496, marker=false
2025-12-11 13:39:09.403 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.403 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58027, timestamp=50932496, marker=false
2025-12-11 13:39:09.403 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.403 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58028, timestamp=50932496, marker=false
2025-12-11 13:39:09.404 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.404 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58029, timestamp=50932496, marker=false
2025-12-11 13:39:09.404 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.404 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58030, timestamp=50932496, marker=false
2025-12-11 13:39:09.404 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58031, timestamp=50932496, marker=false
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58032, timestamp=50932496, marker=false
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58033, timestamp=50932496, marker=false
2025-12-11 13:39:09.405 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.406 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58034, timestamp=50932496, marker=false
2025-12-11 13:39:09.406 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.406 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58035, timestamp=50932496, marker=false
2025-12-11 13:39:09.406 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.421 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58036, timestamp=50932496, marker=false
2025-12-11 13:39:09.421 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.421 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58037, timestamp=50932496, marker=false
2025-12-11 13:39:09.421 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.421 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58038, timestamp=50932496, marker=false
2025-12-11 13:39:09.422 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.464 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58039, timestamp=50932496, marker=false
2025-12-11 13:39:09.464 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.465 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58040, timestamp=50932496, marker=false
2025-12-11 13:39:09.465 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.465 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58041, timestamp=50932496, marker=false
2025-12-11 13:39:09.465 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58042, timestamp=50932496, marker=false
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58043, timestamp=50932496, marker=false
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58044, timestamp=50932496, marker=false
2025-12-11 13:39:09.466 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58045, timestamp=50932496, marker=false
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58046, timestamp=50932496, marker=false
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58047, timestamp=50932496, marker=false
2025-12-11 13:39:09.467 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58048, timestamp=50932496, marker=false
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58049, timestamp=50932496, marker=false
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58050, timestamp=50932496, marker=false
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58051, timestamp=50932496, marker=false
2025-12-11 13:39:09.468 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.482 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58052, timestamp=50932496, marker=false
2025-12-11 13:39:09.482 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.482 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58053, timestamp=50932496, marker=false
2025-12-11 13:39:09.482 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.525 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58054, timestamp=50932496, marker=false
2025-12-11 13:39:09.525 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58055, timestamp=50932496, marker=false
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58056, timestamp=50932496, marker=false
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58057, timestamp=50932496, marker=false
2025-12-11 13:39:09.526 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58058, timestamp=50932496, marker=false
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58059, timestamp=50932496, marker=false
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58060, timestamp=50932496, marker=false
2025-12-11 13:39:09.527 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58061, timestamp=50932496, marker=false
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58062, timestamp=50932496, marker=false
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58063, timestamp=50932496, marker=false
2025-12-11 13:39:09.528 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58064, timestamp=50932496, marker=false
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58065, timestamp=50932496, marker=false
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58066, timestamp=50932496, marker=false
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.529 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58067, timestamp=50932496, marker=false
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58068, timestamp=50932496, marker=false
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58069, timestamp=50932496, marker=false
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58070, timestamp=50932496, marker=false
2025-12-11 13:39:09.530 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.544 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58071, timestamp=50932496, marker=false
2025-12-11 13:39:09.544 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58072, timestamp=50932496, marker=false
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 1426
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58073, timestamp=50932496, marker=true
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 578
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009758844, size=128923, sequenceNumber=58073
2025-12-11 13:39:09.587 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.588 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58074, timestamp=50936096, marker=true
2025-12-11 13:39:09.588 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 44
2025-12-11 13:39:09.588 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009718844, size=48, sequenceNumber=58074
2025-12-11 13:39:09.588 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58075, timestamp=50939696, marker=true
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 24
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009678844, size=28, sequenceNumber=58075
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58076, timestamp=50943296, marker=true
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 20
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009638844, size=24, sequenceNumber=58076
2025-12-11 13:39:09.589 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58077, timestamp=50946896, marker=true
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 120
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009598844, size=124, sequenceNumber=58077
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58078, timestamp=50950496, marker=true
2025-12-11 13:39:09.590 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 56
2025-12-11 13:39:09.605 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009558844, size=60, sequenceNumber=58078
2025-12-11 13:39:09.605 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.605 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58079, timestamp=50954096, marker=true
2025-12-11 13:39:09.606 25865-8303 RtpH264Reader com.novasky.guorui E writePayloadFromArray方法:[B@4b8f2fe 84
2025-12-11 13:39:09.606 25865-8303 RtpH264Reader com.novasky.guorui D Sample metadata sent: timeUs=-39009518844, size=88, sequenceNumber=58079
2025-12-11 13:39:09.606 25865-8303 RtpH264Reader com.novasky.guorui D consume方法中发送sampleMetadata: true false
2025-12-11 13:39:09.606 25865-8303 RtpH264Reader com.novasky.guorui D Consuming RTP packet: seq=58080, timestamp=50957696, marker=true
2025-12-11 13:39:09.645 25865-25901 .novasky.guoru com.novasky.guorui W Throwing OutOfMemoryError "Failed to allocate a 64 byte allocation with 225720 free bytes and 220KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC." (VmSize 15356828 kB)
--------- beginning of crash
2025-12-11 13:39:09.651 25865-25901 AndroidRuntime com.novasky.guorui E FATAL EXCEPTION: ExoPlayer:Playback
Process: com.novasky.guorui, PID: 25865
java.lang.OutOfMemoryError: Failed to allocate a 64 byte allocation with 225720 free bytes and 220KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
at android.media.MediaCodec.getBuffer(Native Method)
at android.media.MediaCodec.getInputBuffer(MediaCodec.java:4128)
at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.getInputBuffer(AsynchronousMediaCodecAdapter.java:254)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1394)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:898)
at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1314)
at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:391)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1367)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:697)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
2025-12-11 13:39:09.682 25865-8303 .novasky.guoru com.novasky.guorui W Throwing OutOfMemoryError "Failed to allocate a 80 byte allocation with 73776 free bytes and 72KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC." (VmSize 15356828 kB)
2025-12-11 13:39:09.699 25865-8303 LoadTask com.novasky.guorui E OutOfMemory error loading stream
java.lang.OutOfMemoryError: Failed to allocate a 80 byte allocation with 73776 free bytes and 72KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
at java.util.Arrays.copyOf(Arrays.java:3257)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
at java.lang.StringBuilder.append(StringBuilder.java:137)
at androidx.media3.exoplayer.rtsp.reader.RtpH264Reader.writePayloadFromArray(RtpH264Reader.java:302)
at androidx.media3.exoplayer.rtsp.reader.RtpH264Reader.writePayloadFromParsable(RtpH264Reader.java:298)
at androidx.media3.exoplayer.rtsp.reader.RtpH264Reader.processSingleNalUnitPacket(RtpH264Reader.java:171)
at androidx.media3.exoplayer.rtsp.reader.RtpH264Reader.consume(RtpH264Reader.java:126)
at androidx.media3.exoplayer.rtsp.RtpExtractor.read(RtpExtractor.java:178)
at androidx.media3.exoplayer.rtsp.RtpDataLoadable.load(RtpDataLoadable.java:175)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:453)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
2025-12-11 13:39:10.010 25865-25901 .novasky.guoru com.novasky.guorui W Throwing OutOfMemoryError "Failed to allocate a 32 byte allocation with 43752 free bytes and 42KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC." (VmSize 15356956 kB)
2025-12-11 13:39:10.010 25865-25901 System.err com.novasky.guorui W java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 43752 free bytes and 42KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
2025-12-11 13:39:10.042 25865-25877 .novasky.guoru com.novasky.guorui W Throwing OutOfMemoryError "Failed to allocate a 24 byte allocation with 23680 free bytes and 23KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC." (VmSize 15356956 kB)
2025-12-11 13:39:10.042 25865-25877 System com.novasky.guorui E java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 23680 free bytes and 23KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:64)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
at java.lang.Daemons$Daemon.run(Daemons.java:139)
at java.lang.Thread.run(Thread.java:920)
---------------------------- PROCESS ENDED (25865) for package com.novasky.guorui ----------------------------
2025-12-11 13:39:10.144 326-326 ClientCache surfaceflinger E failed to get buffer, invalid process token
2025-12-11 13:39:10.178 624-649 WindowManager system_server W Failed to deliver inset state change to w=Window{c41a82a u0 com.novasky.guorui/com.novasky.guorui.MainActivity EXITING}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:571)
at android.view.IWindow$Stub$Proxy.insetsControlChanged(IWindow.java:687)
at com.android.server.wm.WindowState.notifyInsetsControlChanged(WindowState.java:4037)
at com.android.server.wm.InsetsStateController.lambda$notifyPendingInsetsControlChanged$6$InsetsStateController(InsetsStateController.java:552)
at com.android.server.wm.InsetsStateController$$ExternalSyntheticLambda1.run(Unknown Source:2)
at com.android.server.wm.WindowAnimator.executeAfterPrepareSurfacesRunnables(WindowAnimator.java:345)
at com.android.server.wm.WindowAnimator.animate(WindowAnimator.java:226)
at com.android.server.wm.WindowAnimator.lambda$new$1$WindowAnimator(WindowAnimator.java:106)
at com.android.server.wm.WindowAnimator$$ExternalSyntheticLambda0.doFrame(Unknown Source:2)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
at android.view.Choreographer.doCallbacks(Choreographer.java:845)
at android.view.Choreographer.doFrame(Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
2025-12-11 13:39:10.198 326-326 BpTransact...edListener surfaceflinger E Failed to transact (-32)
2025-12-11 13:39:10.202 326-326 BpTransact...edListener surfaceflinger E Failed to transact (-32)
你好,这个是我抓到内存溢出的日志
1️⃣ 时间戳换算逻辑错误,导致 timeUs 为超大负数
2️⃣ FU-A 分片累积逻辑没有任何“异常保护”,一个 IDR 被拆成了上百个 RTP 包,最终一次性 flush 出 128KB sample
microkatz commentedon Dec 19, 2025
@zhangyuankai
Thanks for the helpful logs.
That is odd for the negative time value for the samples. Could you do reproduce the scenario and this time also provide the timestamp values utilized by
toSampleTimeUs? It would be helpful to know what the startTimeOffset and first timestamp of your stream. With this information we can verify the correctness of thetoSampleTimeUscalculation.zhangyuankai commentedon Dec 22, 2025
好的,具体的时间戳我这边暂时没复现了,因为我们换成h265的流了,时间戳这个问题我是这么处理的
/**
*/
public static long toSampleTimeUs(
long startTimeOffsetUs,
long rtpTimestamp,
long firstReceivedRtpTimestamp,
int mediaFrequency) {
// 关键:RTP timestamp 必须当 unsigned 32-bit 处理
long timestampDelta =
(rtpTimestamp - firstReceivedRtpTimestamp) & 0xFFFFFFFFL;
return startTimeOffsetUs
timestampDelta,
/* multiplier= / C.MICROS_PER_SECOND,
/ divisor= */ mediaFrequency);
}
最主要的问题还是内存溢出的问题,我还在测试中,有新的日志会提供给你们
zhangyuankai commentedon Dec 24, 2025
我这边有几点信息需要补充下:
1.我们用到了多个不同品牌的摄像头(大华,海康威视,天元)
2.我们的使用场景是长时间的视频监控
3.目前遇到的问题有:(内存溢出,偶尔会有很大的分片单元(FU)会导致拆包失败或未收到END 位标记,长时间画面静止不动的情况下是收不到IDR帧的处理问题)
还有一个是目前在将rtp包组装好下发给mediacodec的时候,是依赖rtpMarker的状态判断的,如果是网络不好或者丢包的情况下收不到rtpMarker,整个视频画面的状态就会进入错乱状态
这边是我通过测试发现的问题,希望能有帮助,感谢
Translated in English:
I have a few points to add: 1. We are using multiple cameras from different brands (Dahua, Hikvision, Tianyuan).
Our use case is long-term video surveillance.
Current issues include: (memory overflow, occasional large fragment units (FUs) causing packet disassembly failures or missing END bit markers, and issues with receiving IDR frames when the image is static for extended periods).
Another issue is that when assembling RTP packets and sending them to the media codec, it relies on the RTPMarker's status for judgment. If the network is poor or there is packet loss, the RTPMarker may not be received, causing the entire video feed to become distorted.
These are the issues I discovered through testing. I hope this is helpful. Thank you.
zhangyuankai commentedon Dec 24, 2025
我目前摄像头都是H265格式的
Translated in English:
My cameras are currently all in H.265 format.
zhangyuankai commentedon Dec 24, 2025
另外我昨天已经将版本更新至1.9.0了
Translated in English:
I also updated to version 1.9.0 yesterday.
Handle RTP timestamp wraparound in RtpReaderUtils
google-oss-bot commentedon Jan 12, 2026
Hey @zhangyuankai. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
zhangyuankai commentedon Jan 13, 2026
还有时间戳回绕问题
Handle RTP timestamp wraparound in RtpReaderUtils
Handle RTP timestamp wraparound in RtpReaderUtils
Handle RTP timestamp wraparound in RtpReaderUtils
Handle RTP timestamp wraparound in RtpReaderUtils