Bug 503545

Summary: H264 stream does not conform to baseline
Product: [Plasma] KRdp Reporter: armin.novak
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, armin.novak, kdedev, nate
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description armin.novak 2025-04-29 19:08:01 UTC
The H264 stream from krdp (from a debian trixie install) can not be decoded by OpenH264

To test:
1. install OpenH264
2. Compile FreeRDP with OpenH264 support (disable FFMPEG/x264)
3. Connect with xfreerdp (or any other client)
4. Have a white screen and an endless log of decoder errors

I suspect that the H264 stream does not contain the NAL/stream configuration in the first frame and therefore the decoder does not know how to decode the data.

The most important log entries are:
```
[20:58:47:948] [43057:0000a85b] [WARN][com.freerdp.codec] - [openh264_decompress]: DecodeFrame2 state: 0x0004 iBufferStatus: 0
[20:58:47:948] [43057:0000a85b] [WARN][com.freerdp.gdi] - [gdi_SurfaceCommand_AVC420]: avc420_decompress failure: -2002, ignoring update.
[20:58:47:989] [43057:0000a85b] [WARN][com.freerdp.codec] - [openh264_decompress]: DecodeFrame2 iBufferStatus: 0
[20:58:48:263] [43057:0000a85b] [WARN][com.freerdp.codec] - [openh264_decompress]: DecodeFrame2 iBufferStatus: 0
[20:58:48:375] [43057:0000a85b] [WARN][com.freerdp.codec] - [openh264_decompress]: DecodeFrame2 iBufferStatus: 0
```
(the last message repeats endlessly)

the DecodeFrame2 return 0x04 is bsBitstreamError from OpenH264