Split from #1010: with the fault injection and after unapplying r10993 to trigger the window decode error codepath, you can hit:
Error: invalid encoding: jpeg libav: non-existing PPS 0 referenced libav: decode_slice_header error libav: non-existing PPS 0 referenced libav: decode_slice_header error libav: non-existing PPS 0 referenced libav: decode_slice_header error libav: non-existing PPS 0 referenced libav: decode_slice_header error libav: no frame! avcodec_decode_video2 h264 decoding failure: Invalid data found when processing input paint_with_video_decoder: wid=1, h264 decompression error on 440 bytes of picture data for 498x316 pixels using \ dec_avcodec.Decoder({'decoder_height': 316, 'encoding': 'h264', 'colorspace': 'YUV444P', \ 'actual_colorspace': 'YUV444P', 'height': 316, 'decoder_width': 498, 'width': 498, 'version': (56, 60, 100), \ 'formats': ['YUV422P', 'BGRX', 'GBRP', 'RGB', 'YUV420P', 'BGRA', 'ARGB', 'XRGB', 'YUV444P'], \ 'frames': 0L, 'type': 'avcodec', 'buffers': 0}), \ options={'quality': 99, 'encoding': 'h264', 'pts': 439, 'frame': 1, 'csc': 'YUV444P', 'speed': 40}
Looks like the previous decoding error causes a video encoder reset, and the client is getting some kind of video context mismatch.
This only happens with nvenc, x264 is immune to this problem.
Got the bug, not the fix. Problem is that nvenc can return an empty frame (not sure why - we don't have I frames yet, could be a driver or library issue?), when that happens we miss frame 0, which is what the client uses to know when to re-start the decoder.
TODO:
Turns out, I was wrong: the frames aren't empty, this bug is not specific to nvenc, it is just easier to hit with a fast encoder. It isn't just triggered by decoding errors either, anything that cancels damage can probably trigger it.
The problem is that when we get a decoding error, we cancel damage - unsafely. r11003 + r11008 fix that. Will backport.
@afarr: just a FYI, this could explain the non-existing PPS 0 referenced
you had reported. Please close.
Ok, closing... will watch for stuff to test.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1012