The function is debug-only, so only compile it in debug mode. Make it static as it has no uses outside of the file. Change av_log() to av_dlog().
This simplifies matching of timestamps between input frames and output packets.