Use avg_frame_rate instead of r_frame_rate for libav10+ API