Modified TvideoCodecLibavformat.[cpp|h] as follows:
* Replaced all h264_has_start_code with codecId==CODEC_ID_H264
* Removed h264_has_start_code as class member variable
* removed isTSfile() as class member method
* changed ::append() to search for 0x00 00 01, rather than optional AU delimiters.
This fix works with all H.264 files, program streams, and transport streams. The original code had two branches: one branch went right to the h264_search_recovery code in the random access, the other waited to receive a CPB before sending it on through that h264_search_recovery() branch.
This is basically assuming that files are perfectly formed with no missing bytes, which would not be correct from a recorded H264 stream (an H264 VES stream sent through UDP could be missing packets).
At any rate, libavcodec seems to like complete NAL units, and it doesn't require complete coded picture buffers (CPB)s.
I'll implement the CPB patch if you'd like, but my testing has indicated it isn't strictly necessary.