hevc: Set the maximum num_reorder_pics to AVCodecContext.has_b_frames.

Output frames after the num_reorder_pics so that num_reorder_pics==0
outputs frames immediately.