H264encoderdemo corrupts video

the h264encoderdemo included with the 4.9 kernel corrupts the video and folds the frames and corrupts the colors.

Is there an update to this utility?

We faced a similar problem.
h264encoderdemo uses vpcodec library that comes pre-installed in khadas`s ubuntu. We tried to use this lib in our application and it corrupted the color after 2-3 hours of continious streaming (encoding).

Khadas provides the sources of h264encoderdemo. There are also sources of the vpcodec library in the repo encoder_libs_aml/libencoder/h264 at master · numbqq/encoder_libs_aml · GitHub (at the bjunion_enc directory).
After we built vpcodec library from these sources the corruption problem no longer occured. Therefore I would recomemnd you to build h264encoderdemo without using the preinstalled vpcodec library but with a manually compilled one.