h264: fix the check for mixed IDR/non-IDR slices