encoders: Playing -> NULL state change causing permanent hang
I've noticed that my pipeline, which contains a vaapi encoder, totally freezes if I set its state to Null.
Some notices:
-
Pipeline does not hang if no frames were encoded, even if the state was
Playing
-
All the decoders I've tried hang: vp8, vp9, h264.
-
x264enc and vp9enc work fine
-
the last Info message the graph produces is this one (ret == FLUSHING)
I've tested it on two Arch boxes with different Intel HW and gstreamer-vaapi (1.16.0) and libva-intel-driver (2.3.0). I didn't figure out how to use gstreamer-vaapi with the new media driver yet.
The python script reproducing the issue is attached, the first stop
callback hangs and never prints "Done". When vaapih264enc is replaced by x264enc, stop
works fine.
It seems the issue is rooted somewhere in the common encoders' logic in gstvaapiencode.c
.