I am developing a tool which receives a h.264 live stream from the network (the sender is a hardware encoder), buffers the last x-minutes and creates a video file of the last x-
This might not be the case, but avformat_write_header function should be used for writing header instead of function pointer in AVOutputFormat.write_header