moonlight-stream / moonlight-common-android

Android common library - now embedded in Moonlight Android
GNU General Public License v3.0
115 stars 31 forks source link

Fix off-by-one when looking for an I-frame NAL #15

Closed nanotech closed 7 years ago

nanotech commented 7 years ago

Between finding the NAL and checking its type, reassembleFrame is called and overwrites the cachedSpecialDesc with the data and NAL type from the previous NAL. If the only IDR NAL in the packet is the last NAL in the packet, it gets missed and the depacketizer is stuck waiting for it.

cgutman commented 7 years ago

@nanotech did you actually hit this scenario in real use? If so, what was your configuration like?

nanotech commented 7 years ago

I'm working on a new server implementation. I don't know what the Nvidia server is sending here, but my implementation does work with the moonlight-common-c clients as-is, which don't have this bug.

cgutman commented 7 years ago

Ah, very cool. I was just trying to determine the urgency of getting this patch out to Java-based Moonlight clients.

nanotech commented 7 years ago

Thanks!