In the function flv_write_packet(AVFormatContext *s, AVPacket *pkt), the following code was added which will causes decoding errors (because the header info should not be write to every frame, it just need to be write at the beginning):
-
-
flv_write_codec_header(s, par, pkt->dts);