Jetson AGX Thor R38.2.0: `nvv4l2h264enc` hangs at EOS with Baseline profile and B-frames

Disclosure: Drafted with AI assistance (ChatGPT). Reproduced on actual Jetson hardware.

Environment: Jetson AGX Thor, Jetson Linux R38.2.0, GStreamer 1.24.2.

Reproduction:

for profile in 0 2; do
  echo "H.264 profile=$profile"
  timeout 8s gst-launch-1.0 -e -q \
    videotestsrc num-buffers=18 pattern=ball ! \
    'video/x-raw,format=I420,width=320,height=180,framerate=25/1' ! \
    nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! \
    nvv4l2h264enc profile=$profile \
      num-B-Frames=2 num-Ref-Frames=2 ! \
    h264parse ! fakesink sync=false
  echo "exit=$?"
done

Observed: profile=0 (Baseline, the default) hangs and requires termination. profile=2 (Main) exits normally. B=1 also hangs with Baseline.

Expected: An incompatible Baseline+B-frame configuration should be rejected immediately with a clear error, not accepted and left hanging at EOS.

Note: Main/High prevents this hang but does not fix the separate B-frame timestamp bug reported previously.

Hi,
Please try Jetpack 7.2.1 r39.2.1, as suggest in
Jetson AGX Thor: `nvv4l2h264enc` outputs incorrect PTS/DTS with B-frames - #4 by DaneLLL